Consulting

Results 1 to 3 of 3

Thread: Macros not enabled etc. Runtime Error 1004

  1. #1
    VBAX Newbie
    Joined
    Jun 2018
    Posts
    2
    Location

    Macros not enabled etc. Runtime Error 1004

    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
    Last edited by Aussiebear; 08-07-2018 at 04:24 PM. Reason: Added cose tages

  2. #2
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,055
    Location
    In your workbook, have you removed the "'" from the Run command, and are macros enabled upon opening?
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  3. #3
    VBAX Newbie
    Joined
    Jun 2018
    Posts
    2
    Location
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •