Save As

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

Does anyone know how to bring up the Save As dialog box with the filename of
my choice?

Many thanks in advance.

Libby
 
Libby,

Try something like the following:

Dim FName As Variant
FName = Application.GetSaveAsFilename("default_name.xls", _
"Workbook Files (*.xls),*.xls")
If FName <> False Then
MsgBox "You choose filename: " & FName
Else
MsgBox "You cancelled"
End If


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Put the filename in inverted commas in brackets after the
Application.GetSaveAsFilename command, e.g.

Sub savesheet()
Sheets("Sheet1").Select
Do
fName = Application.GetSaveAsFilename("testname.xls")
Loop Until fName <> False
ActiveWorkbook.SaveAs Filename:=fName
End Sub

Andrea Jones
 
Thanks Andrea :o)

Andrea Jones said:
Put the filename in inverted commas in brackets after the
Application.GetSaveAsFilename command, e.g.

Sub savesheet()
Sheets("Sheet1").Select
Do
fName = Application.GetSaveAsFilename("testname.xls")
Loop Until fName <> False
ActiveWorkbook.SaveAs Filename:=fName
End Sub

Andrea Jones
 

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

Back
Top