Save as

  • Thread starter Thread starter jln via OfficeKB.com
  • Start date Start date
J

jln via OfficeKB.com

I need to add save as to my marco. What i need to happen is a save as with
the file name that will be pulled from cell C2 and then close the file.
 
Try this:

Dim FileName As String

FileName = Range("C2")
FileName = "C:\" & FileName & ".XLS"

Application.DisplayAlerts = False
ActiveWorkbook.SaveAs FileName:=FileName, FileFormat:= _
xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False _
, CreateBackup:=True
Application.DisplayAlerts = True

HTH,

- Bas
 
Back
Top