Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default 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
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
Before Save code Kelly Excel Worksheet Functions 4 January 30th 08 03:57 PM
How to save my VBA-code Heine Excel Worksheet Functions 4 September 26th 06 05:46 PM
SAVE AS code narutard[_20_] Excel Programming 1 July 21st 05 03:16 PM
Save without VBA code? Joel Excel Programming 1 June 7th 05 05:15 PM
save without code Roman Töngi Excel Programming 7 January 10th 05 07:52 PM


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