You can use your favorite social network to register or link an existing account:
Or use your email address to register without a social network:
Sign in with these social networks:
Or enter your username and password
Forgot your password?
Yes, please link my existing account with for quick, secure access.
No, I would like to create a new account with my profile information.
Today’s author is Jan Karel Pieterse, an Excel MVP. You can find more useful tips from Jan Karel on his website: http://www.jkp-ads.com/. This post provides detailed instructions to prevent auto-open and Workbook-Open events from running.
As a fulltime developer I oftentimes open files containing VBA and want to be able to run code. At the same time I sometimes want to prevent Workbook_Open event code or an Auto_Open macro from running. This little article shows you how to achieve that.
Excel 2010
Macro security set to low or trusted document
If you have set your macro security to "Enable All Macros" or you have already set the document to trusted or the document is in a trusted folder, click File, Open, select your file and hold down the shift key when you click the Open button:
Fig. 1: Selecting the file from the File, Open dialog (Excel 2010)
Of course your file might be listed in the Most Recently Used files (MRU) list. In that case, hold shift when you click the file in the list:
Fig. 2: Clicking the file on the MRU (Excel 2010)
Doing so will prevent the Workbook_Open event from firing and the Auto_Open macro from running.
Macro security set to prompt
If your document is not in a trusted folder, has never been set to be trusted and macro security is set to something other than enable all macros to run, you can repeat what I've shown above.
Normally, if you open such a document, Excel will show the security bar. In this situation however, due to you holding down shift, Excel shows this window:
Fig. 3: Enable macros dialog (Excel 2010)
Because you held down the shift button when you clicked the file in the MRU or when you clicked the Open button, you can now just click "Enable macros" and no Automacros will run.
Excel 2007
Fig. 4: Selecting the file from the File, Open dialog (Excel 2007)
Fig. 5: Clicking the file on the MRU (Excel 2007)
Fig. 6: Enable macros dialog (Excel 2007)
Excel 97, 2000, XP, 2003
In case your macro security is set to low, or your VBA code is signed and you have set the publisher as trusted, you must hold down the shift key when you click the Open button on the File, Open dialog:
Fig. 7: Opening the file from the File, Open dialog (Excel 97-2003)
Fig. 8: Clicking the file on the MRU (Excel 97-2003)
Macro security set to medium or higher
If your macro security is set to at least "Medium" and you have never set its publisher to trusted (for a signed macro) you can forget about holding shift when opening the file or clicking the file on the MRU list. Instead, you must hold shift when you enable macros:
Fig.9: Hold shift when you press Enable macros
Comments: (2) Collapse
I typed in this data to make a chart in excel
index Marks
10060 61
10061 64
10062 66
10063 55
I formatted all index numbers as text
insert->charts
I get a chart with two series (index & marks)
this is obviously not what I want
I want a chart with marks against index not index and marks!@#
Strangely,
if I first format the cells I intend to use for the index numbers as text beforehand
and then type the data in
excel marks the index numbers with a green flag indicating a possible error
NOW I get the chart that I need; marks against index
Also make the Number format combo box dropdown a bit longer so that the "Text" format option is visible, It's a pain to have to scroll just to get to the last option
fix this please
Thanks! I couldn't remember for the life of me how to do that! That will help immensely when I am trying to debug my files! Thanks!
Comments: (loading) Collapse