Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
XP XP is offline
external usenet poster
 
Posts: 389
Default Call Workbook_BeforeClose

I need to call Workbook_BeforeClose from a standard code module in the same
file...what is the syntax to do this?

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Call Workbook_BeforeClose

Dim b As Boolean
Call ThisWorkbook.Workbook_BeforeClose(b)

Ensure Workbook_BeforeClose is Public and not default Private

Why not let your BeforeClose event call a procedure in an ordinary module,
the same procedure can be simply called from elsewhere

Regards,
Peter T

"XP" wrote in message
...
I need to call Workbook_BeforeClose from a standard code module in the

same
file...what is the syntax to do this?

Thanks.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Call Workbook_BeforeClose

Even easier (not much but it seems easier to me) is to just use Auto_Close.
Try

Sub Auto_Close()
MsgBox "Tada"
End Sub

--
HTH...

Jim Thomlinson


"Peter T" wrote:

Dim b As Boolean
Call ThisWorkbook.Workbook_BeforeClose(b)

Ensure Workbook_BeforeClose is Public and not default Private

Why not let your BeforeClose event call a procedure in an ordinary module,
the same procedure can be simply called from elsewhere

Regards,
Peter T

"XP" wrote in message
...
I need to call Workbook_BeforeClose from a standard code module in the

same
file...what is the syntax to do this?

Thanks.




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? kartune85[_11_] Excel Programming 6 June 26th 06 08:53 AM
Call Center Management: How to calculate 'cost per call' Denniso6 Excel Discussion (Misc queries) 2 June 25th 06 05:01 PM
Workbook_BeforeClose Alan McQuaid via OfficeKB.com Excel Programming 3 June 13th 06 04:36 PM
Workbook_BeforeClose [email protected] Excel Programming 1 April 11th 06 10:53 AM
Workbook_BeforeClose Don Guillett[_4_] Excel Programming 1 August 31st 04 02:27 PM


All times are GMT +1. The time now is 05:50 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"