LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
SharonP.
 
Posts: n/a
Default VBA for file save as

When I use the following code, the File/Save As Windows dialog box opens and
as long as a file name is supplied - the file saves properly. However, if
you click Cancel and don't provide a file name - a false.xls file is created.
Is there a way to avoid this? What I want is just for the save as function
to cancel without a save.

'Prompts to save the TLR file with the appropriate name

ChDir "U:\ACTUARIAL\Renewals"
sFilename = Application.GetSaveAsFilename("", "excel files (*.xls),*.xls")
ActiveWorkbook.SaveAs Filename:=sFilename
 
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
macro save a workbook whilst increasing file no shrek Excel Worksheet Functions 0 November 10th 05 02:40 PM
Save as Msg box monster Excel Discussion (Misc queries) 3 August 31st 05 06:45 PM
Save as Msg box Bob Umlas, Excel MVP Excel Discussion (Misc queries) 0 August 29th 05 09:56 PM
cannot edit and save jp Excel Discussion (Misc queries) 1 February 8th 05 05:12 PM
Save & Save As features in file menu of Excel Blue Excel Discussion (Misc queries) 9 December 27th 04 08:49 PM


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