Open A File Programatically And Disable Macros

Jun 28, 2009

When I have a macro open another file, it always activates the macros in it. Is there some way to disable the macros?

View 11 Replies


ADVERTISEMENT

Open Workbook, Disable Macros

Apr 22, 2006

Is it possible to open a workbook via vba, but disable the macros? I know this sounds strange, but the workbook is coded to prevent users from saving it, and the only way to save it is to either open it with macros disabled or change the variable OKtoSave to true, but the variable is global only to the sheet and I can't find a way to change it through a macro written in my personal.xls workbook.

View 5 Replies View Related

Remove/Disable Open File As Read Only Option

Apr 9, 2008

Is there a way to remove the option to open a file as read only when the file is already open by another user? Ideally when a user tries to open a file that is already in use they would get a message to that effect and the only option at that point would be for them to select "notify" when file is available.

View 8 Replies View Related

Open File From A Macros To Get Some Data From It

Jul 9, 2009

1- how can i open an xls file from a macros to get some data from it?

2- how can i set a wait function, till i press a special button before macros will be able to continue.

e.g.:
[macros.xla]

View 9 Replies View Related

Unable To Open Multiple File And Run Macros In It

Dec 20, 2013

I am facing an issue where my macro is unable to open multiple files and run the macros in it. Below is the code that i am using and it stops at boss1.

VB:
Sub allboss()

Call boss1
Call boss2

End Sub

[Code] .....

View 2 Replies View Related

Generate File Name Programatically

Aug 18, 2009

I have a series of files, all named sequentially by date, for example...

Sales Report - Week of 2009-07-27 - NH.xlsm
Sales Report - Week of 2009-08-03 - NH.xlsm
Sales Report - Week of 2009-08-10 - NH.xlsm

...and so on. (The dates are always Mondays.)

I want to get the contents of a particular range on the previous file (e.g. the "RaceResults" range a.k.a. B4:B33 on "Sales Report - Week of 2009-08-10 - NH.xlsm")

View 2 Replies View Related

Encourage Enabling Of Macros: Disable Macros When Opening Then The Worksheet Menu Bar And Other Command Bars Are Still Available

Aug 26, 2009

I have an Excel 2003 program that contains macros. One of the macros hides certain command bars and disables the worksheet menu bar. On close the opposite is true. The problem is, if a user uses the disable macros when opening then the worksheet menu bar and other command bars are still available. I would like to hide all of the data sheets and display another sheet that would normally be hidden displaying a message that the macros have to be enabled for the program to work correctly if disable macros is chosen. When the enable macros are used I would like the Error page to be hidden.

View 6 Replies View Related

Enable/Disable Macros When No Macros Are Present

Jul 28, 2008

I have a user that keeps a maintenance log in an Excel worksheet and sends an updated copy once a week to a board member. Two weeks ago, the board member started complaining that he was prompted to enable/disable macros on opening and became worried when my user stated that no macros were used in the book. He is now concerned that we have sent him a virus.

I know the file is clean because I've scanned it, and when I look at the file in VB, there are no modules or classes present just the Sheets 1-3 and the ThisWorkbook file. None of these objects have any code in them. My user does have some macros in PERSONAL.XLS but they are not used in the workbook in question.

No one else gets the prompt for enabling/disabling macros. Even if I set my security to prompt for any macros, I get no message. I'm convinced that there must be some setting in his Excel that is causing this individual to get this message. Is there anything else other than a macro that would cause this?

View 9 Replies View Related

Open Message Box Or Disable Option On Open

Mar 30, 2007

how to make a MsgBox open anytime a cell in Column A was double-clicked--and the content of the MsgBox was from the cell in the same row in column Z. I've now realized the double-clicking isn't an ideal solution, as it's easy to click in another cell and mess up all the formulas.

(1) Code that deactivates the "edit directly in cell" option when the workbook is opened.

(2) Code that opens the MsgBox when a cell in Column A is clicked just once (or similarly less fool-proof than double-clicking or right-clicking).

View 2 Replies View Related

Disable Macros After Specified Date

Feb 16, 2009

effectively disable ALL macros associated with a workbook if it's opened after an "expiration date" that's buried on a very hidden sheet.

I think I can figure out how to render the entire workbook useless after the expiration date, but I need to retain all formatting, underlying data and formulas so that macros can be re-enabled if I change the expiration date.

View 10 Replies View Related

Enable/Disable Macros- None There

Apr 24, 2009

On several of my worksheets, I'm asked if I want to disable/enable the macros but there are none associated with that particular worksheet- matter of fact, none of my worksheets have macros unless pivot tables count, so why am I being prompted in that way?

View 9 Replies View Related

Disable Macros On Opening Using Vba

Feb 22, 2007

I have created an Excel template that the company sends out to suppliers to provide us with Quotations. I've added some VB in the Before Save module to prompt the user to do certain things. The problem I have is that I run another procedure that loops through a list of data and re-formats it using the template and therefore every time it tries to save a file the Before Save prompt pops up.

View 2 Replies View Related

Disable Cut / Copy And Paste Using Macros

Jun 27, 2014

I want to disable cut,copy,paste functionality (shortcut keys also) from excel.

View 1 Replies View Related

Pop Up Message To Enable Or Disable The Macros

Apr 17, 2008

Whenever I open an Excel file that has macros in it, a message always pop up and ask if I want to enable or disable the macros.

Is there a way to get rid of the message?

View 9 Replies View Related

Auto-disable Macros Opening Workooks Via VBA

Aug 1, 2006

I have to open some woorkbooks via VBA disabling macros automatically (the reason of this is very hard to explain, my boss wants it in this way)

Does any parameter exist to add it to the woorkbook.open function? or any trick to do this?

View 3 Replies View Related

Option To Hide The Sheet When Disable Macros Is Clicked

Apr 29, 2009

Is there any option to deactivate the "Disable macros"

Or

When i open the userform it asks for enable and diable macros. If i click "Disable macros" then the users can manipulate the data inside the excel sheet. i need to avoid this problem.

So, is there any option that if i do "Disable macro" then the corresponding sheet for the which the Userform is linked should not be visible or hidden.

View 9 Replies View Related

How To Disable Combobox On Radio Button Click In Macros

May 19, 2009

how to disable combobox on radio button click in excel macros'

I have 2 radio buttons: optionbutton1 and optionbutton2 and two comboboxes: Combobox1 and Combobox2.If i select 1st radio button 2nd combobox should be disabled.Vise versa

View 9 Replies View Related

File Open Dialogue Box To Open In (Directory Of Tool File)

May 31, 2013

I have a tool file which contains Excel VBA codes. When I click button it asks to select a file. I want that anytime I click the button the dialogue box should open in the folder containg the tool.,

View 1 Replies View Related

Activate Sheet And Disable Tabs On Open

Dec 6, 2008

I am trying to create an event macro that would deactivate column and row headers when the workbook is launched and activate a sheet. i am not managing to do this,

View 2 Replies View Related

Disable Macro In Workbook Open When Saved

Nov 17, 2011

I have a macro in a workbook template,that when the workbook is open it populates a cell with the date and time such as 111711.507. This becomes the contract number for this workbook.. They complete the form or workbook and save it. The next time they open the saved workbook the macro runs and changes the contract number to a new number. I want to disable the macro on the saved workbook from changing the number.

View 2 Replies View Related

Disable Query Refresh Message On Open

Sep 24, 2007

I have a model which extracts data from an external data sournce using an ODBC query. This data is then used to generate a pivot table. I have incorporated code to update the query and the pivot table on startup but would like to disable the Enable Query Refresh message box which occurs at startup (it would also be nice to disable the security warning but I know that is a no no)

View 2 Replies View Related

Macro -open The Look In List” And Stop So I Can Pick A File To Open

Oct 18, 2008

I want to create a macro that will “open the look in list” and stop so I can pick a file to open. I’ve tried to use “record a macro” and “ctrl-o”, but the record a macro won’t stop until I pick a file or cancel the file list. I also tried to use “o” in the short cut key box

View 5 Replies View Related

Disable The Vba In A File Being Opened Using Vba

May 20, 2007

I have excel vba code to open .xls files on my server. Files to open are chosen by the user via a UserForm within my app, it shows them all their files in their directory on my server. How can I open their files (.xls) that they select but DISABLE the VBA from being able to run/execute, if they have any attched to the file?

I now have all code in place to open the file no problem, I just need to know how to disable the VBA part from being "turned on" when the file opens.

View 9 Replies View Related

To Open Worksheets Without Macros From VBA

Dec 23, 2009

Does anyone know if it is possible to open an excel worksheet from excel VBA, without importing the macros from the worksheet being opened?

I have tried the following approach:

View 14 Replies View Related

Enable Macros On Open

Feb 12, 2010

Is there any code that will automatically enable macros on Auto_Open?

View 6 Replies View Related

Run Macros On Open Statement

Sep 13, 2006

I would like to when open a certain spreasheet it would perform a certain task.

View 3 Replies View Related

Don't Open Or Use Workbook Unless Macros Are Turned On?

Dec 9, 2008

Is there a way to prevent a workbook from opening unless macros are allowed?

View 2 Replies View Related

Get Macros To Open Embedded Documents

Jun 11, 2014

I am trying to create a macro to add to a button that will open an embedded document (word, PPT, and excel).

I recorded the macro and it works fine the first time I try to test it but after it tells me that there is an error...

I'm not exactly sure what to do. Unfortunately, I could not find what I needed on youtube

Error: It talks about the object being out of range and allows me to debug... the code that is in the developer is:

Sub Macro1()
'
' Macro1 Macro
'
'
Sheets("Sheet2").Select
Windows("Worksheet in Book1").Visible = True
Selection.Verb Verb:=xlPrimary
ActiveWindow.Close
Sheets("Sheet1").Select
End Sub

The Windows line is what it tells me to fix.. from there I am lost... Is it because I am trying to do a double clicking function?

View 5 Replies View Related

Workbook To Open Only If Macros Are Enabled

Mar 29, 2009

I have created an Excel Workbook and this Workbook has a VBA code that enforces an expiry date of the workbook (TimeBomb from cpearson.com). So, if the expiry date has passed, the workbook will not open. But since it is VBA related, the expiry date will work only if one has enabled macros. If macros are disabled, the workbook will open regardless of the date.

So, is there a way for Excel to check if macros are enabled? and is there a way for Excel not to open the workbook, if the macros are disabled?

View 10 Replies View Related

Why Enabling Macros When I Open Some Of My Files

Apr 21, 2009

i am trying to work out why i always have to enable macro's when i open some of my files that i have macros in, as i save them as enable macro file. I run excel 2007
as there are files i want to open without clicking on the enable button.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved