Save As dialog box in macro

  • Thread starter Thread starter Dennis
  • Start date Start date
D

Dennis

Last week I learned how to invoke a FileOpen dialog box
in a macro so that the filename could be inserted at
runtime. I need to do the opposite now--bring up a Save
As dialog box to let the user navigate and enter a file
name. Where can I find the code to do this?
 
Right here:

Sub test()
Dim F As Variant
F = Application.GetSaveAsFilename
MsgBox F & " rules"
End Sub

HTH. Best wishes Harald
 
Look at GetSaveAsFileName method in VBA help.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Thanks! Works great!
-----Original Message-----
Right here:

Sub test()
Dim F As Variant
F = Application.GetSaveAsFilename
MsgBox F & " rules"
End Sub

HTH. Best wishes Harald




.
 
Back
Top