VBA to save a xlsm as an xlsm
I have the following macro which I now want to save the file as a .xlsm file type rather than an xls
I’ve tried various permutations and nothing has changed the file type!
Is anyone able to help please?
Sheets(“Control Sheet”).Select
Range(“d5”).Copy
Range(“e5”).PasteSpecial Paste:=xlPasteValues
Dim fPath
Dim fName
With Application.FileDialog(msoFileDialogFolderPicker)
If .Show = True Then
fPath = .SelectedItems(1) & “”
fName = fPath & Range(“e5”).Value & “.xls”
Call MsgBox(fName, vbInformation, “Save Path”)
ThisWorkbook.SaveAs Filename:=fName
Range(“e5”).Select
Selection.ClearContents
Range(“c5”).Select
Sheets(“Preparer”).Select
Range(“c13”).Select
End If
End With
End Sub
I have the following macro which I now want to save the file as a .xlsm file type rather than an xls I’ve tried various permutations and nothing has changed the file type! Is anyone able to help please? Sheets(“Control Sheet”).SelectRange(“d5”).CopyRange(“e5”).PasteSpecial Paste:=xlPasteValuesDim fPathDim fNameWith Application.FileDialog(msoFileDialogFolderPicker)If .Show = True ThenfPath = .SelectedItems(1) & “”fName = fPath & Range(“e5”).Value & “.xls”Call MsgBox(fName, vbInformation, “Save Path”)ThisWorkbook.SaveAs Filename:=fNameRange(“e5”).SelectSelection.ClearContentsRange(“c5”).SelectSheets(“Preparer”).SelectRange(“c13”).SelectEnd IfEnd WithEnd Sub Read More