Hi, I'm writing a macro that will save a file under a new name. I will need it to give the user an option to choose the name and the location to save the file.
I have the following code: A Syntax Error message appears and I'm not sure how to fix this.
' Save_File Macro
Dim ActSheet As Worksheet
Dim ActBook As Workbook
Dim CurrentFile As String
Dim NewFileType As String
Dim NewFile As String
Application.ScreenUpdating = False ' Prevents screen refreshing.
CurrentFile = ThisWorkbook.FullName
NewFileType = "Excel Files 1997-2003 (*.xls), *.xls," & _
"Excel Files 2007 (*.xlsx), *.xlsx," & _
"All files (*.*), *.*"[/b]
[b]NewFile = Application.GetSaveAsFilename( _
If NewFile <> "" And NewFile <> "False" Then
[b] ActiveWorkbook.SaveAs Filename:= NewFile, _
Set ActBook = ActiveWorkbook
Application.ScreenUpdating = True