View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_3_] Jim Thomlinson[_3_] is offline
external usenet poster
 
Posts: 983
Default Need VBA code for Save As dialog

Thanks... That was quicker than looking it up... :-)

"Chip Pearson" wrote:

Jim,

GetSaveAsFileName simply returns a filename (or False if the user
cancels the dialog). It doesn't actually do the save. Displaying
the xlDialogSaveAs will carry out the save operation.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"Jim Thomlinson" wrote
in message
...
Sorry I accidentally hit post too fast. Tom. What is the
difference between

Application.Dialogs(xlDialogSaveAs).Show sStr

and

fname = application.GetSaveAsFileName( InitialFileName:=sStr)

?

"Jim Thomlinson" wrote:

To get the save as dialog use

Application.Dialogs(xlDialogSaveAs).Show fname

HTH

"Tom Ogilvy" wrote:

sStr = Thisworkbook.Path & "\" & activecell.value & ".xls"

fname = application.GetSaveAsFileName(
InitialFileName:=sStr)

--
Regards,
Tom Ogilvy




"Bill Sturdevant"
wrote in
message
...
I am trying to create a button that will pick a value from
a specified
cell
and put up a Save As dialog pre-filled with the name of
the file as
Value-I-Picked.xls and the suggested path as the path of
the workbook I
originally opened.

Where can I find suggestions for appropriate code?