I am using a vbs code to open and run an Excel macro automatically but getting the following error message:
Error: Cannot run the Macro "file location". The macro may not be available in this workbook or all macros may be disabled. Code: 800A03EC Source: Microsoft Excel
VBS Code:
Dim ObjExcel, ObjWB
Set ObjExcel = CreateObject("Excel.Application")
ObjExcel.Visible = True
Set ObjWB = ObjExcel.Application.Run("C:\Automation\TestCasesBackupScript.xlsm!Backup3")
ObjWB.Close False
ObjExcel.Quit
Set ObjExcel = Nothing
Macro is enabled and the "Backup3" is the Sub name in a module of TestCasesBackupScript.xlsm file.
Hoping for feedback.
Thank you.