Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Placing a code before Save & Save As
Hi, I am using Excel 2002 and I want to place a code before my user actually Save the worksheet or use the Save As using the standard menu and tool bar. How do I place a code there? The save and save as are in the MS Excel menu/tool bar. I just want to place a code to do a simple copy and paste. I don't know how to access so I can place me code. Any tips will be appreciated. Thank you |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Placing a code before Save & Save As
you have to use an event code
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) in the vbeditor open vbproject (control+R) doube click <thisworkbook under your file under the new window on the left hand side choose <workbook on the riht hand side choose <before_save place the code here save the file whenever you save the file the code will fire. -- remove $$$ from email addresss to send email ====================== "Alex Martinez" wrote in message ... Hi, I am using Excel 2002 and I want to place a code before my user actually Save the worksheet or use the Save As using the standard menu and tool bar. How do I place a code there? The save and save as are in the MS Excel menu/tool bar. I just want to place a code to do a simple copy and paste. I don't know how to access so I can place me code. Any tips will be appreciated. Thank you |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Before Save code | Excel Worksheet Functions | |||
How to save my VBA-code | Excel Worksheet Functions | |||
SAVE AS code | Excel Programming | |||
Save without VBA code? | Excel Programming | |||
save without code | Excel Programming |