Solved: Excel 2007: Bypass Workbook_Open Code
Have been grappling with Office 2007 differences, and came across a wonderful little gem!
I have a workbook that just takes a backup of a database and zips it up; requests to restore network backups can take days depending on the organisation, so this is my little local workaround.
Unfortunately on this particular workbook, holding down [Shift] does NOT bypass the Workbook_Open procedure, even when opening the workbook from within Excel.
The workbook is located within a "trusted location". One method would be to remove the trusted location and disable all macros, but this seems overkill to open and modify a single file.
My current workaround:
[VBA]
Sub EditBackupWorkbook()
Const cstrPath = "S:\MyPath\Backup_Database.xlsm"
Application.EnableEvents = False
Workbooks.Open cstrPath
Application.EnableEvents = True
End Sub
[/VBA]
If anyone has any suggestions as to why this might be occurring in the first place, I'm all ears :thinking: