LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default BeforeClose and Workbooks.SaveAs Filename:=


Hi All -

I've got a function call to save a workbook in the ThisWorkbook BeforeClose.
The function contains the following line:

Workbooks(sWbName).SaveAs Filename:=var_FileName

where, sWbName is a String, which is passed to the function as
ThisWorkbook.Name

and, var_FileName is a local Variant that is set as follows:
var_FileName = Application.GetSaveAsFilename(not showing args)


For whatever reason, the SaveAs line is not working. It raises no Err. Through
the debugger, sWbName is set as the currently opened workbook, and is correct.
Also through the debugger, var_FileName gets set properly by
Application.GetSaveAsFilename(), and contains the full path to the file.

Any ideas? Thanks.

 
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
Need code to close minimized workbooks in BeforeClose event Cheryl Excel Programming 3 August 17th 07 10:53 PM
SaveAs Filename:=filename, FileFormat:=xlCSV Teddy[_3_] Excel Programming 2 May 29th 07 02:34 PM
SaveAs filename PDF kidkarma Excel Programming 2 March 8th 07 08:25 AM
FileName SaveAs alanford Excel Programming 1 February 18th 05 01:01 PM
SaveAs Filename Help Ed[_14_] Excel Programming 2 November 20th 03 07:43 PM


All times are GMT +1. The time now is 06:25 AM.

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"