View Full Version : How to ByPass Workbook_Open Execution
Cyberdude
09-16-2008, 02:54 PM
I haven't had to do this in a long time, but I wrote some stupid code that executes from my Workbook_Open macro then closes the workbook. I need to edit the Workbook_Open macro but the code always executes to completion before giving me control. I seem to recall the bypass technique involved using the shift key when opening the workbook, but I can't get that to bypass opening and executing Workbook_Open. Please refresh my memory. I feel so inadequate sometimes . . . :bug: Phffffft!
dominicb
09-16-2008, 03:28 PM
Good evening Cyberdude
Holding down the Shift key while the workbook opens usually does the trick for me.
Or failing that why not alter your macro security permissions to medium and opt not to run macros when the workbook opens?
HTH
DominicB
TheAntiGates
09-16-2008, 03:59 PM
The shift key is only effective when selecting a file to open from within Excel. If you hold shift while double-clicking a filename in a Folder, it has no effect. Dominic's security advice also handles it, though you shut down the rest of your code (besides WorkBook_Open) as well.
(I never venture below medium security, limiting the prompts distraction with digital certificates.)
Paul_Hossler
09-16-2008, 05:02 PM
As I recall, this works in 2003 also
/s or /safemode
Forces Excel to bypass all files that are stored in startup directories, such as the default XLStart folder located in the directory where Excel or the 2007 Microsoft Office system is installed.
Example
excel.exe /s
Paul
Mavyak
09-16-2008, 05:11 PM
Disable macros and then open the workbook.
Cyberdude
09-16-2008, 07:29 PM
Thanx, Gang . . . will get on it first thing tomorrow.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.