Save As dialog box in macro

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?
 
H

Harald Staff

Right here:

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

HTH. Best wishes Harald
 
B

Bob Phillips

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)
 
D

Dennis

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




.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top