Erstellt von: Ziad Iqbal 2/19/2012 6:00 AM
The blog will show you how you can add a button that will allow you to jump to today on a Gantt chart.
To download or print this blog
Due to increased demand for our customers for a simple button to enable to scroll to today's date in Gantt chart in Microsoft Project Professional/Standard 2010, we have decided to put the guideline on our official blog.
In Microsoft Project 2010, goto to menu View, then on the far right hand side click the bottom arrow of Macros then Visual Basic. This will let you open Visual Basic which allows you to add or import Macros that help you allow this Macro to function upon button click.
1))
The Microsoft Visual Basic window will be loaded displaying the file Global.MPT opened (on top title bar). Since you will like this button to be available in all projects you must edit in ProjectGlobal. Therefore you need to expand ProjectGlobal (if not expanded) then under it expand Modules and right click on it and then click Import file from the menu.
2))
You will find a Open Dialog box, where you will have to select the GotoTodayinGantt.bas file from the folder where you have it download. You can download the GotoTodayinGantt.bas file here.
3))
After the dialog box appears find the file, select it and click Open. When it is added, close the Visual basic Dialog box simply.
Goto the Task Menu now and somewhere on the ribbon bar (preferably on empty space) right click to pop up a customization menu. Click on "Customize the Ribbon..." option to add a button.
4))
Here you need to create a group before you can add buttons to it. Create a Group and rename it from the default name.
5))
Perhaps you can also change the icon of the group if you wish to.
6))
Then select Macros from "Choose commands from" drop down box.
7))
You will already find the GotoTodayInGantt Macro you have added before. Selct it and click on Add button to add it to the selected group (the custom group you just created). Renaming and changing icon could also be interesting for you.
8))
9))
After selecting the icon, click OK and then you are ready to go! Click on Goto Today in Gantt button to jump / scroll the windows to today or current system date in Gantt chart.
10))
If you are a tech and would like to create the module yourself and would not like to download the given file, its easy, just add the following code in a new Module in Global.MPT
Sub GotoTodayInGantt() EditGoTo Date:=Now End Sub
That should be enough. Now anytime you open MS Project, the icon will be there. If you do not see this on all projects, then you more than likely did not add the code to the Global.MPT file, so re-check the steps listed above.
Ziad Iqbal
Derzeit 0 Kommentare