hautoguy2021
New Member
- Joined
- Jan 8, 2021
- Messages
- 8
- Office Version
- 365
- Platform
- Windows
I get "compile Error" "Syntax Error" when i run the macro in the worksheet. Any help here?
End Sub
VBA Code:
Sub FileNameAsCellContent()
Dim FileName As String
Dim Path As String
Application.DisplayAlerts = False
Path = "C:\test\"
FileName = Range("E3").Value & ".xlsx"
ActiveWorkbook.SaveAs Path&FileName,xlOpenXMLWorkbook
Application.DisplayAlerts = True
ActiveWorkbook.Close