Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 270
Default 'SaveAs Filename' versus 'GetSaveAsFilename'


Ok, this is probably a really stupid question....but I don't understand the
difference between these two, when you should use one versus the other, and
specifically in terms of how/what they actually save behind the scenes (i.e.,
whether or not they trigger the Workbook_BeforeSave sub). I've read the VBA
help and some other sources, but still am confused. Can someone enlighten me
please?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default 'SaveAs Filename' versus 'GetSaveAsFilename'

Paige,

GetSaveAsFileName displays a dialog that allows you to either select a folder and/or file or enter a
filename. It, by itself, returns a string, which you can either use as the filename or do other
things with. It has nothing whatsoever to do with actually saving the file.

SaveAs Filename is what actually saves the workbook (as the filename - a string value). The
filename can have a path associated with it, or just be a valid filename, in which case the file is
saved in the current folder.

Most often, they are used together:

ActiveWorkbookSaveAs Application.GetSaveAsFilename

Only the SaveAs triggers the Workbook_BeforeSave sub, and actually will also cause SaveAsUI to be
True.

HTH,
Bernie
MS Excel MVP


"Paige" wrote in message
...
Ok, this is probably a really stupid question....but I don't understand the
difference between these two, when you should use one versus the other, and
specifically in terms of how/what they actually save behind the scenes (i.e.,
whether or not they trigger the Workbook_BeforeSave sub). I've read the VBA
help and some other sources, but still am confused. Can someone enlighten me
please?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 270
Default 'SaveAs Filename' versus 'GetSaveAsFilename'


Thanks for the clarification!!

"Bernie Deitrick" wrote:

Paige,

GetSaveAsFileName displays a dialog that allows you to either select a folder and/or file or enter a
filename. It, by itself, returns a string, which you can either use as the filename or do other
things with. It has nothing whatsoever to do with actually saving the file.

SaveAs Filename is what actually saves the workbook (as the filename - a string value). The
filename can have a path associated with it, or just be a valid filename, in which case the file is
saved in the current folder.

Most often, they are used together:

ActiveWorkbookSaveAs Application.GetSaveAsFilename

Only the SaveAs triggers the Workbook_BeforeSave sub, and actually will also cause SaveAsUI to be
True.

HTH,
Bernie
MS Excel MVP


"Paige" wrote in message
...
Ok, this is probably a really stupid question....but I don't understand the
difference between these two, when you should use one versus the other, and
specifically in terms of how/what they actually save behind the scenes (i.e.,
whether or not they trigger the Workbook_BeforeSave sub). I've read the VBA
help and some other sources, but still am confused. Can someone enlighten me
please?




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
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:24 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"