A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hi,
try this
Sub SaveAs_02()
'Nov 18, 2014
On Error GoTo errh
Dim cel
cel = Range("E1").Value '<< file name e.g. file1, file001, book1,
ChDrive "e"
ChDir "e:\tmp"
Dim fName
fName = Application.GetSaveAsFilename(cel, filefilter:="Excel Files <.xlsm> (*.xlsm), *.xlsm")
If fName <> False Then
If MsgBox("save as " & vbCr & fName, vbOKCancel) = vbCancel Then Exit Sub
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:=fName, FileFormat:=52 'xlsm
Application.DisplayAlerts = True
Else
MsgBox "cancel"
End If
Exit Sub
errh:
MsgBox "wrong, try again"
End Sub