Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
tk
 
Posts: n/a
Default Event when workbook is saved or closed

Is there an event that fires when a workbook is saved or closed. I have
tried adding workbook_save and workbook_close functions (to the thisworkbook
object), but the code that I put in never fires. The workbook_open seems to
work ok. I am using Excel 2003.

Thanks,


  #2   Report Post  
Posted to microsoft.public.excel.misc
vezerid
 
Posts: n/a
Default Event when workbook is saved or closed

Workbook_BeforeSave
Workbook_BeforeClose

If you are at the ThisWorkbook's code page, you will see at the top of
the window two drop-down boxes. At first, in an empty module, the left
one says: (General). If you choose ThisWorkbook instead, then the right
box will contain all the workbook-level event procedures.

HTH
Kostis Vezerides

  #3   Report Post  
Posted to microsoft.public.excel.misc
Thunder
 
Posts: n/a
Default Event when workbook is saved or closed


"tk" ha scritto nel messaggio
...
Is there an event that fires when a workbook is saved or closed. I have
tried adding workbook_save and workbook_close functions (to the

thisworkbook
object), but the code that I put in never fires. The workbook_open seems

to
work ok. I am using Excel 2003.

Thanks,



I don't understand. I have the following code and work fine:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
MsgBox ("Your Workbook is in order to be closed")
End Sub

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
MsgBox ("Your Workbook is in order to be saved")
End Sub

--
Ciao
Thunder



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
Linking to a closed workbook Danedel Excel Worksheet Functions 2 February 3rd 06 06:43 PM
Protect Workbook vs Worksheet?? Dan B Excel Worksheet Functions 3 November 7th 05 09:02 PM
LOCATING A CHART SAVED IN A WORKBOOK FLKULCHAR Excel Discussion (Misc queries) 0 June 24th 05 05:26 AM
How can I see a copy of a saved workbook before I saved it again? Norma Excel Worksheet Functions 2 May 11th 05 10:31 AM
Why can't I access workbook after saved to CD? BP Excel Discussion (Misc queries) 7 January 18th 05 09:33 PM


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