I want to create a Personal Macro Workbook programmatically with VBA. I am having an issue creating it.
This is what I currently have:
On the last line of code, I get a runtime error 1004. This extension cannot be used with the selected file type.
How else can I approach this problem? Any help would be greatly appreciated.
This is what I currently have:
VBA Code:
personalWBName = "PERSONAL.XLSB"
personalFilePath = Application.UserLibraryPath & personalWBName
Application.Workbooks.Add
Set personalWB = ActiveWorkbook
personalWB.SaveAs FileName:=personalFilePath, FileFormat:=xlOpenXMLWorkbookMacroEnabled
On the last line of code, I get a runtime error 1004. This extension cannot be used with the selected file type.
How else can I approach this problem? Any help would be greatly appreciated.