VBA to save a xlsm as an xlsx
I have the following macro which I now want to save the file as a .xlsx file type rather than a macro-enabled workbook.
I’ve tried various permutations and nothing has changed the file type!
Is anyone able to help please?
PS It would also be great if it didn’t give the warning that the macros will no longer work!
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 .xlsx file type rather than a macro-enabled workbook.I’ve tried various permutations and nothing has changed the file type!Is anyone able to help please?PS It would also be great if it didn’t give the warning that the macros will no longer work!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