none
Project 2016 - Macro not running from Ribbon RRS feed

  • Question

  • Using MS Project 2016, I created a macro (just to copy values from various fields).

    Step 1: Check that the macro works (OK)

    I select View->Macro->View Macro.

    I can edit and run the macro, and it works.

    Step 2: Add the Macro to the ribbon (OK)

    I then add the Macro to the Ribbon:

    Files->Option->Customize Ribbon

    And add the Macro.

    It is added to the ribbon.

    Step 3: Check that it works when calling the Macro from the ribbon (Failed)

    When I click, the macron don't seem to run at all.

    ???

    What can go wrong here?

    Thanks.

    Wednesday, May 24, 2017 9:03 AM

Answers

All replies

  • Here is the MACRO, which copy one column to another.

    works fine when I run the macro directly, not working from the button.

    ---

        Dim Temp As String
        Temp = "View: " & ActiveProject.CurrentView & vbCrLf
        Temp = Temp & "Table:" & ActiveProject.CurrentTable & vbCrLf
        Temp = Temp & "Filter: " & ActiveProject.CurrentFilter
        MsgBox Temp

        SelectTaskColumn Column:="% Complete"
        EditCopy
        SelectTaskColumn Column:="%Plan"
        EditPaste

    ---

    Tuesday, June 6, 2017 3:01 AM
  • Same issue for me !

    Still no answer ?

    Friday, July 14, 2017 12:03 PM
  • Hi, it's working for me.  I'm using Project 2016 build 8229.2073.  I added the macro to a new tab.  

    Ben Howard [MVP] | web | blog | book

    Saturday, July 15, 2017 8:09 PM
    Moderator
  • I've just come across the same problem and have discovered that the Macro is bound to the underlying Project Name, e.g. if I create a Macro called 'Bob' in a Project called 'Jane' then the macro is held in the ribbon as Jane.mpp!.Bob - If I now change the Project name to Fred my Ribbon pointer is pointing to Jane.mpp!Bob and won't run.

    I can get around this by adding the macro to Global.mpt and recompiling then adding the macro from Global.mpt to my project and there won't be problem, except when I want to roll out a Project Template to many people because I would have to send out a Ribbon customization file AND a Global Template - all of which is a bit of pain when the people on the receiving end may not be particularly experienced Project users (why I'm adding macro's in the first place) - aaaaagh!


    Nigel Parsons

    Friday, August 9, 2019 7:38 AM