ThrottleWorks
Excel Ninja
Hi,
I am trying to save as a file. Original file is a macro. When I save as the file and re-open it I cannot see code in the file.
I know I am doing some silly mistake here but not able to find.
Can anyone please help me in this.
Please note original file is in .xls format.
I am trying to save as a file. Original file is a macro. When I save as the file and re-open it I cannot see code in the file.
I know I am doing some silly mistake here but not able to find.
Can anyone please help me in this.
Please note original file is in .xls format.
Code:
Sub Save_File()
Application.DisplayAlerts = False
Dim sFilename As String
Dim MappingSht As Worksheet
Dim MyFolderPath As String
Set MappingSht = MacroBook.Worksheets("Tab_Headers")
MyFolderPath = MappingSht.Range("B1").Value
sFilename = Worksheets("Summary").Range("A3").Value
ActiveWorkbook.SaveAs Filename:=MyFolderPath & sFilename & ".xls", FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
Range("A1:A3").ClearContents
ThisWorkbook.Worksheets("Summary").Range("A1:A3").ClearContents
Application.DisplayAlerts = True
End Sub