Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default Making a macro run when the user closes a workbook

On the VBE editor,

double click "ThisWorbook"

then use this.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
your macro here
End Sub

Regards,

Cesar Zapata

"KD" wrote in message
...
Is there any way I can get a macro to run automatically
everytime a user closes down the workbook?

Many thanks

KD



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
making NT user/login user appear in a cell [email protected] Excel Worksheet Functions 1 March 3rd 09 03:41 AM
Using macro to stop user from emailing workbook scooppbear Excel Discussion (Misc queries) 1 May 17th 06 05:43 AM
I want a macro to save a workbook as a user inputted cell EAHRENS Excel Discussion (Misc queries) 3 November 8th 05 03:28 PM
looping a calculation until workbook closes tjb Excel Worksheet Functions 0 April 22nd 05 07:06 PM
Workbook Unexpectedly Closes Immediately AD Excel Discussion (Misc queries) 0 January 31st 05 08:03 PM


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