none
Executing a macro in MS Project via a stand-alone button

    Question

  • Please excuse my ignorance, but being new to programming in MS Project, is there a way to add a stand-alone button in MS Project and assign it to a macro, similar to the way you can add a shape (e.g., rounded rectangle) in Excel and assign it to a macro?

    If the answer is "It can't be done", then can someone kindly tell me how I can execute a macro in MS Project without having to click on the Tools menu, then on the Macro sub-menu, then on the Macros... sub-menu, and then on the Run button?  I need to create an easy way for end-users to execute my macro without having to click through a bunch of menus.

    I am using MS Project 2007.  Thanks in advance for any assistance.

    Friday, June 03, 2011 5:01 PM

Answers

  • Hi,

    What do you mean by "stand alone"?

    You can connect a macro to a button IN A TOOLBAR, and if necessary you can create a new (stand alone?) toolbar.

    Tools, Customize, toolbars.

    Leave this open all the time

    Toolbars Pad, New: name the new Toolbar, OK. The new toolbar now floats.

    Commands pad, drag ANY button into your toolbar

    Right Click on the new button, change the image.

    Click assign macro, select your macro, OK

    If necessary the floating toolbar can be dragged among the other toolbars.

    Greetings,

    • Marked as answer by emerald77 Sunday, June 05, 2011 3:23 PM
    Friday, June 03, 2011 6:01 PM
  • OK, enough time lost.

    Would you simply have tried tit, you would have seen that your toolbar is automatically stored in your Global.mpt (I did hope you had heard about the organizer and global.mpt) and as such available for all projects in that machine.

    You would also have seen that when you create it it floats, and by simply dragging a toolbar around you can make it float.

    If you want to make it accessible to all users, copy it into a file (using Tools, Organizer) save that file, send it to your end users (or store it on a file server where they have access) with the instruction to use Tools, Organizer to copy it into their global.mpt. Done this many times for customers, works like a charm.

    Indeed in 2010 it is more complicated and some things like creating your own button is so complicated I dare not even begin.


    • Marked as answer by emerald77 Sunday, June 05, 2011 3:23 PM
    Friday, June 03, 2011 8:40 PM

All replies

  • Hi,

    What do you mean by "stand alone"?

    You can connect a macro to a button IN A TOOLBAR, and if necessary you can create a new (stand alone?) toolbar.

    Tools, Customize, toolbars.

    Leave this open all the time

    Toolbars Pad, New: name the new Toolbar, OK. The new toolbar now floats.

    Commands pad, drag ANY button into your toolbar

    Right Click on the new button, change the image.

    Click assign macro, select your macro, OK

    If necessary the floating toolbar can be dragged among the other toolbars.

    Greetings,

    • Marked as answer by emerald77 Sunday, June 05, 2011 3:23 PM
    Friday, June 03, 2011 6:01 PM
  • Hi Jan,

    By "stand-alone" I meant having a "floating" button that I can place anywhere within MS Project (similar to adding a shape anywhere on an Excel worksheet and then assigning that shape to a macro).

    Based on your response, it sounds like the only option I have is to assign my macro to a button on a new toolbar.  I'm okay with doing that.  However, after I have created the new toolbar, will it be "stored" with my file and available to my end users when they open up the file?

    Thanks again.

    Friday, June 03, 2011 7:06 PM
  • Here's an article on how to add a toolbar and a button with VBA: http://msdn.microsoft.com/en-us/library/ee767705.aspx. It also explains how to make the change persistent across all projects you open on your computer (editing Global.mpt). You can also make this happen for all existing and future projects for all users, if you're in a server environment and you edit "Enterprise Global"
    Friday, June 03, 2011 7:33 PM
  • Unfortunately, the article you suggested applies to Project 2010 and the Fluent user interface with a ribbon.

    As I mentioned in my original post, I am using Project 2007.

    Thanks all the same.

    Friday, June 03, 2011 7:52 PM
  • Ah, ok, I missed that. Anyway, the same principles apply in 2007 for global.mpt and enterprise global.
    Friday, June 03, 2011 8:04 PM
  • Unfortunately, my end-users don't have Project Server.  Each end-user simply has his/her own copy of MS Project.  So it appears I will have to manually re-create the custom toolbar on each end-user's machine.  Argh!

    Thanks again.

    Friday, June 03, 2011 8:14 PM
  • OK, enough time lost.

    Would you simply have tried tit, you would have seen that your toolbar is automatically stored in your Global.mpt (I did hope you had heard about the organizer and global.mpt) and as such available for all projects in that machine.

    You would also have seen that when you create it it floats, and by simply dragging a toolbar around you can make it float.

    If you want to make it accessible to all users, copy it into a file (using Tools, Organizer) save that file, send it to your end users (or store it on a file server where they have access) with the instruction to use Tools, Organizer to copy it into their global.mpt. Done this many times for customers, works like a charm.

    Indeed in 2010 it is more complicated and some things like creating your own button is so complicated I dare not even begin.


    • Marked as answer by emerald77 Sunday, June 05, 2011 3:23 PM
    Friday, June 03, 2011 8:40 PM
  • As I mentioned in my original post, I am new to programming in MS Project, which includes being unfamiliar with the Global.mpt.

    But now that you have made me aware of it, as well as the steps to copy and transfer the new floating toolbar, I am good to go.

    Thanks again for all your help.  I greatly appreciate it.

     

    Sunday, June 05, 2011 3:22 PM
  • When you only have Microsoft Project , one way to transfer custom objects between user workstations is to create a file called 'Shared Objects.mpp' on your network. Open 'Shared Objects' on your workstation and transfer the custom objects using the File | Organizer. Save 'Shared Objects' back to network. Each user that wants to share these objects can open 'shared Objects'  and transfer them into their GLOBAL.mpt. Microsoft does not let you copy Global.mpt.

    When you have Project Server with Enterprise Global, all you have to do is upload custom objects to the Enterprise Global and everyone can share them. Not everyone can update the Enterprise global. You need the right authorization.

    Thursday, June 19, 2014 7:03 PM
  • Hi,

    Quote: "Microsoft does not let you copy Global.mpt"

    It does let me copy global.mpt - I'm doing it every day with a cstomer abroad even sending Global.mpt as attachment with a mail!

    Who told you it can't be done?

    Greetings,

    Thursday, June 19, 2014 7:30 PM