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
ADVERTISEMENT
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
View Related
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
Dec 9, 2008
Is there a way to prevent a workbook from opening unless macros are allowed?
View 2 Replies
View Related
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
Nov 2, 2008
My son just upgraded my computer from 2000 to xp - a new application on a new hard drive. in the process, Excel was upgraded from 97 SR-1 to 97 SR-2.
My checkbook is on excel, and I really need to open it! We just moved to a new location, with the typical problems with email, internet etc.
I can open workbooks without macros. But I cannot open any with macros.
I get this message:
"Could not register the Visual Basic environment."
When that window is closed, the next one says:
"An error occured when initializing the VBA libraries (126)"
View 9 Replies
View Related
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
Oct 28, 2013
I'm posting a workbook on our network that I want to enable users to go in and update. I have the workbook designed, with entry fields for the data they need to enter, and they then push "Submit" to submit the new data to a hidden tracking log within the workbook.
Many of the users will be complete Excel newbies, and although I haven't posted the workbook yet, I am trying to anticipate possible issues. The first that comes to mind is that the user opening the workbook may not have macros enabled in their version of Excel, and they will get a message, and can't perform the udpate. Is there a way to add a Workbook Open event that automatically enable macros in the workbook when they open it, even if it is for this workbook only?
View 5 Replies
View Related
Jul 30, 2009
I'd like to automatically run 1 of 4 macros depending on some criteria. Every workbook created has, unfortunately, the same worksheet name, so that leaves the only differences between the 4 possible loaded workbooks in the cells area and even those can be similiar in many ways. But....I found some criteria to separate all 4 workbooks...Here they are...
run macro 1 if this
1. Worksheet name says "Screen"
2. Cell H1 has the word "Lead"
run macro 2 if this
1. Worksheet name says "Screen"
2. Cell B1 has the word "records" somewhere in the cell
3. Cell H1 has the word "Lead"
run macro 3 if this
1. Worksheet name says "Screen"
2. Cell B1 has the word "records" somewhere in the cell
3. Cell N2 has the word "Delivered"
run macro 4 if this
1. Worksheet name says "Screen"
2. Cell B1 has the word "records" somewhere in the cell
3. Cell N2 has the word "Bevel"
I don't know if this can be done, but if so, that would be fantastic! I'm thinking that the macro would have to be "global" and in the user's personal workbook?
View 12 Replies
View Related
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
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
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
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
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
Jun 27, 2014
I want to disable cut,copy,paste functionality (shortcut keys also) from excel.
View 1 Replies
View Related
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
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
Apr 6, 2013
I have created a spreadsheet some time ago and have been asked to improve on it but I'm rusty with VBA.
I have an automated ordering system that saves each sent order as the date e.g "05-04-2013.xls" but the management team want a graph with the data for the last 4 weeks compared. I have created a seperate workbook called "consumables report.xls" which has a column with the products listed followed by columns "Quantity" and "cost" which is repeated for the 4 weeks of the month.
I want to add a button to prompt the user to choose the saved order e.g "05-04-2013.xls" (all orders saved in same directory) to copy and paste the quantity and cost columns (c8,D69) into "consumables report.xls". I got this to work earlier but it would only paste the formulas and not the values. So I need
A prompt to open workbook
Copy range (c8,d69)
Close work sheet
Paste special .value (c8,D69)
I dont care if it has to open the workbook to copy the data as this will only be used once a month so it dosnt matter how slow the code is.
week 1 week 2 week 3 week 4
Product
quantity
cost
quantity
cost
cost
quantity
cost
1
2
3
4
5
6
7
8
View 7 Replies
View Related
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
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
Jul 8, 2006
I have Monthly sales sheets that import my cash register data into them. I wanted to set them up to do everything without being there. So I have my task manager open excel at 9:30pm everyday and it runs the macro to import the data into the correct day of the month. Here is the workbook
open macro-
Private Sub Workbook_Open()
Dim dTime As Date
dTime = Time
If dTime >= TimeValue("9:30 PM") And _
dTime < TimeValue("9:40 PM") Then
ImportData
End If
End Sub
This is in my July spreadsheet only. So is there a way to make it know which month spreadsheet to open on the 1st of the month? So come August 1st it will automatically open the August workbook and input the data for the first day? By using the date?
View 9 Replies
View Related
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
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
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
Jul 23, 2005
What is the commands or script for deleting a macro automatically using
another workbook macro.
View 9 Replies
View Related
Nov 6, 2009
I have a presentation that I open from a short-cut. After the "Welcome Page" is opened, I want to open a second workbook in a new instance of Excel after 4 seconds.
I think that I can open the new instance of excel, but I don't know how to activate the macro after 4 seconds.
I'm sure there is a function someplace for this that can be used in a macro.
Then, after the second Workbook is opened, I want the Welcome Page "Workbook" closed, leaving the second Worbook open.
View 14 Replies
View Related
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
Feb 12, 2010
Is there any code that will automatically enable macros on Auto_Open?
View 6 Replies
View Related
Sep 13, 2006
I would like to when open a certain spreasheet it would perform a certain task.
View 3 Replies
View Related
Nov 20, 2008
My Splash screen opens a few seconds after the workbook has loaded. Is there a way to make the workbook open minimzed until the the splash screen closes then open properly? What I trying to say is that only the splash screen is visible until it closes.
View 5 Replies
View Related