Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Preventing workbook_open code executing.
Does anyone know how I can normally open a spreadsheet and execute
workbook_open code and other times open without executing workbook_open code? I have tried holding the shift key when opening but the workbook_open code still executes. I am using Excel 2007 12.0.6504.5001 SP2 MSO 12.0.6425.1000 Some Background: ------------------- I use spreadsheets as a powerful and flexible means of reporting data contained in an SQL database. I save the spreadsheets as an XLT. When the spreadsheet is opened, I use workbook_open code to pre-load data from SQL that is used as combo-box list sources - and set other initial values. The user selects from the combo-box then further data is retrieved that relates to the combo-box selection. When I want to change any macro logic I don't want the pre-loads etc to happen. So I right-click and open the spreadsheet as an XLT. I have incorporated code in the workbook_open routine so that if the spreadsheet is opened as an XLT then the routine is exited and the pre-load data does not load and initial values are not set. All works well. My Problem is when the spreadsheet is opened from a hyperlink : ---------------------------------------------------------------- 1) In this case the spreadsheet opens as an XLT and the pre-loading and initial setting don't happen. 2) If I save the spreadsheet as an XLS then the pre-loads etc happen, BUT when I need to change macro code, then I know of no way to prevent the pre-loads. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Workbook_open not executing | Excel Programming | |||
Workbook_Open not executing in Excel 2007 | Excel Programming | |||
Too many calculations preventing Private Sub from executing macro | Excel Programming | |||
Preventing macro from .xlt from executing in a .xls | Excel Programming | |||
Workbook_Open() Not executing | Excel Programming |