saving with name from cell

  • Thread starter Thread starter jamaz
  • Start date Start date
J

jamaz

thanx Ron,

Any way to place name in save as location but leave path open for
edit?

I appreciate the help!
 
Maybe you like Application.GetSaveAsFilename
See the VBA help for more info

Sub Test()
Dim fname As Variant
Dim Wb As Workbook
Set Wb = ActiveWorkbook
fname = Application.GetSaveAsFilename("", _
fileFilter:="Excel Files (*.xls), *.xls")
If fname <> False Then
Wb.SaveAs fname
Set Wb = Nothing
Else
Set Wb = Nothing
End If
End Sub
 
Use this to use a cell for the file name

fname = Application.GetSaveAsFilename(Sheets("Sheet1").Range("A1").Value, _
fileFilter:="Excel Files (*.xls), *.xls")

--
Regards Ron de Bruin
http://www.rondebruin.nl


Ron de Bruin said:
Maybe you like Application.GetSaveAsFilename
See the VBA help for more info

Sub Test()
Dim fname As Variant
Dim Wb As Workbook
Set Wb = ActiveWorkbook
fname = Application.GetSaveAsFilename("", _
fileFilter:="Excel Files (*.xls), *.xls")
If fname <> False Then
Wb.SaveAs fname
Set Wb = Nothing
Else
Set Wb = Nothing
End If
End Sub
 

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