Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Workbook_BeforeClose [email protected] Excel Programming 1 April 11th 06 10:53 AM
workbook_beforeClose GB Excel Programming 2 March 1st 06 12:39 AM
Workbook_BeforeClose Andrzej Excel Programming 1 June 12th 05 10:01 PM
Workbook_BeforeClose Don Guillett[_4_] Excel Programming 1 August 31st 04 02:27 PM
Workbook_BeforeClose JimP Excel Programming 1 July 5th 04 10:39 PM


All times are GMT +1. The time now is 08:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"