LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
bac bac is offline
external usenet poster
 
Posts: 76
Default Trap New File name before saving

I have a "template" workbook in which a user enters a Sales Order Number and
an SQL is executed to pull relevant data from our datawarehouse into three
worksheets in the workbook.

If the user decides to save the file under a different name, I would like to
remove some code and one of the worksheets. I know I can use the
Workbook_BeforeSave event to execute this code, but I only want it to run it
if the user saves the workbook under a different name.

How can I trap the name the file will be saved to so I can compare that to
the file's current name to determine whether or not to run the desired
BeforeSave code?

TIA
BAC



 
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
Saving Excel 2007 file in 2003 creates very large file Jon Pearce Excel Discussion (Misc queries) 2 July 16th 09 07:20 PM
How do I stop Excel 2000 from saving file history from file that . Cathy Excel Discussion (Misc queries) 0 March 29th 05 03:27 PM
How to trap automatic link prompt when an excel file is being open Partha Excel Programming 2 February 10th 05 07:25 PM
saving an excel file as an ASCII text file without delimiters Sewellst Excel Programming 4 January 7th 05 01:41 PM
File Name Exists Error Trap Mike Excel Programming 2 February 21st 04 01:30 AM


All times are GMT +1. The time now is 12:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"