Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Save As Dialog (with FilePath and FileName suggested)

Status
Not open for further replies.

walkest

Programmer
May 28, 2002
2
AU
Hi,
I need to show the SaveAs dialog (in VBA) and pass 2 arguments into it.
E.G. I want to show the SaveAs dialog with the suggested FilePath pointing to "T:\IMPORT" and the suggested FileName as "[TodaysDate]_Export".
NB: I don't wish to proceed with the Save automatically, I want the user to be able to change the suggested options.
Stacey
 
Stacey,

Use this method:

Application.GetSaveAsFilename("T:\IMPORT" & format(date(),"yyyymmdd") & "_Export.xls", "Excel File (*.XLS), *.XLS", , "Choose a file name")

it returns the full path and filename if one was chosen or false if cancel was selected.

HTH

Ben ----------------------------------
Ben O'Hara
bo104@westyorkshire.police.uk
----------------------------------
 
Hi Stacey,

I started a similiar thread called &quot;How can I suggest a file name?&quot;. You should be able to read it here: <a href=thread707-264913 Hope this helps,
Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top