I have an excel file which have macros , and in its vb code the file is saved as .xltm file but i want to change it to some other format which would containd the macros .
my code behind the save and close button is :
Sub Save_As()
If MsgBox("Are you sure you want to Exit now?", vbYesNo) = vbNo Then Exit Sub
ActiveSheet.Unprotect Password:="C0g!
For Each ws In ThisWorkbook.Worksheets
With ws.UsedRange
.Copy
.Cells(1, 1).PasteSpecial Paste:=xlPasteValues
End With
Next ws
Application.CutCopyMode = False
ActiveSheet.Shapes("UpdateTemplate").Delete
ActiveSheet.Shapes("SaveClose").Delete
Range("F18").Select
ActiveWorkbook.SaveAs Filename:="O:\QA Files\Pending Review\" & Range("D12") & "_" & "BagGla" & "_" & Range("D6") & "_" & Format(Now(), "YYYYMMDDhhmmss") & ".xltm", FileFormat:=53
If Workbooks.Count = 1 Then
Application.Quit
Else
ActiveWorkbook.Close savechanges:=False
End If
End Sub
PLease help me finding a way in which i can save this .xltm file as another file(any format ) which should contains all the macros and data which this file would have.Thanks
Bookmarks