Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
zulfer7
 
Posts: n/a
Default VBA Code to kick off macro when workbook command to close is initi

I wanted some code to run whenever someone was to close the worksheet. Any
Ideas?
  #2   Report Post  
Posted to microsoft.public.excel.misc
Loomah
 
Posts: n/a
Default VBA Code to kick off macro when workbook command to close is initi

Hi
Put your code in the Workbook_BeforeClose event proceedure.

Open the VBE (ALT+F11)
Double click ThisWorkbook in the project explorer window on the left hand
pane
from the left hand dropdown in the code pane (on the right of the window)
choose workbook
Select BeforeClose from the dropdown to the left

;-)



"zulfer7" wrote in message
...
I wanted some code to run whenever someone was to close the worksheet. Any
Ideas?



  #3   Report Post  
Posted to microsoft.public.excel.misc
zulfer7
 
Posts: n/a
Default VBA Code to kick off macro when workbook command to close is i

This was PERFECT!!! Thanks!!!

"Loomah" wrote:

Hi
Put your code in the Workbook_BeforeClose event proceedure.

Open the VBE (ALT+F11)
Double click ThisWorkbook in the project explorer window on the left hand
pane
from the left hand dropdown in the code pane (on the right of the window)
choose workbook
Select BeforeClose from the dropdown to the left

;-)



"zulfer7" wrote in message
...
I wanted some code to run whenever someone was to close the worksheet. Any
Ideas?




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
Errors in VB Code since adding macro Susan Excel Discussion (Misc queries) 1 April 11th 06 08:42 PM
Macro or OLE method to insert worksheet from template workbook Lyndon Rickards Excel Discussion (Misc queries) 0 January 30th 06 08:46 PM
Runing a macro in a workbook from another macro in other workbook dhatul Excel Discussion (Misc queries) 0 January 13th 06 06:27 AM
How can I get a validation to run in a macro on a shared workbook? arewa Excel Discussion (Misc queries) 3 January 2nd 06 11:31 PM
Stubborn toolbars in Excel 007 Excel Discussion (Misc queries) 9 December 11th 04 02:02 PM


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