saving with name from cell

J

jamaz

thanx Ron,

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

I appreciate the help!
 
R

Ron de Bruin

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
 
R

Ron de Bruin

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
 
Top