PDA

View Full Version : Macros not enabled etc. Runtime Error 1004



LadyG
08-07-2018, 08:01 AM
Hi,

I have 5 macros that should run when opening a workbook however I receive a runtime error 1004. Cannot run the macro. The macro may not be available in this work book or all macros may be disabled. Macros are available and enabled in settings.


Private Sub Workbook_Open()
'Run ("RefreshPivotTables")
'Run ("COuntSites")
'Run ("MyCopySaveRv")
'Run ("CopyAnalysis")
'Run ("MyMacro22")
End Sub


Any help would be greatly appreciated.

Thanks
LadyG

Aussiebear
08-07-2018, 04:26 PM
In your workbook, have you removed the "'" from the Run command, and are macros enabled upon opening?

LadyG
08-08-2018, 01:18 AM
Yes I have removed the "'" and I have enabled all macros in Macro settings in the Trust Centre I have also ticked 'Trust access to he VBA project object model'. Thanks