Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
workbook_BeforeClose
This macro execuitesOK when one to closes the workbook. However, apparently
the Excel engine resets all of the variables, public and private. I would appreciate any help in getting around this. I need to key on what was previously set in VB. All help is greatly appreciated. Olie H |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
workbook_BeforeClose
Maybe if you posted the code?
"OlieH" wrote: This macro execuitesOK when one to closes the workbook. However, apparently the Excel engine resets all of the variables, public and private. I would appreciate any help in getting around this. I need to key on what was previously set in VB. All help is greatly appreciated. Olie H |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
workbook_BeforeClose
public twbn as string
macro1() 'iin module1 twbn = "NO" application.quit end sub _______________________ sub Enditall(A) rem clean up at this point exit sub ______________ Public sub workbook_beforeClose(cancel as Boolean) 'in ThisWorkbook if twbn = "YEs" then cancel = false: exit sub rem there is additional code but at this poing twbn is alway = "" ,..., end sub Thanks JLGWhiz for the response "JLGWhiz" wrote: Maybe if you posted the code? "OlieH" wrote: This macro execuitesOK when one to closes the workbook. However, apparently the Excel engine resets all of the variables, public and private. I would appreciate any help in getting around this. I need to key on what was previously set in VB. All help is greatly appreciated. Olie H |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Workbook_BeforeClose | Excel Programming | |||
workbook_beforeClose | Excel Programming | |||
Workbook_BeforeClose | Excel Programming | |||
Workbook_BeforeClose | Excel Programming | |||
Workbook_BeforeClose | Excel Programming |