Save as

  • Thread starter jln via OfficeKB.com
  • 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.
 
B

Bas

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
 

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

Top