100 likes | 234 Views
Phoenix. Using VBA Macros on MS Project Spencer Lamoreaux. Chapter Monthly Meeting March 9th, 2010. Why use VBA?. Create custom toolbars Generate special reports Perform Custom Functions/Automate Routine Tasks. Enhanced Toolbars. Filter on dependent tasks for any selected task.
E N D
Phoenix Using VBA Macros on MS Project Spencer Lamoreaux Chapter Monthly Meeting March 9th, 2010
Why use VBA? Create custom toolbars Generate special reports Perform Custom Functions/Automate Routine Tasks
Enhanced Toolbars Filter on dependent tasks for any selected task Highlight Filters Link to IT MSPS Help Quick look at tasks in the next 2 weeks View Gantt by ww, Qtr, Month, or Days Show Progress Lines Baseline Project Shortcut Quick menu to custom Filters Reset all filters & groups Assign team resources Process Web Updates Quick menu to custom views Quick menu to custom Groups Update team vacations Publish Project to Reports
Basic Process to Create Macro Open project and go to the Visual Basic View (Alt-F11) Click INSERT – MODULE (1st time only. The module will hold all your future macros.) Add the code. Use the object browser if needed to find out functions/objects Customize the ribbon/toolbar to add the new macro to a button. Test and implement!
Basic Example: Hyperlink Sub JumpToMPUG() FollowHyperlink ("http://mpug.com") CommandBars("Web").Visible = False End Sub
Reset the Filters Sub ResetAllFilters() Filt erApply Name:="All Tasks" GroupApply Name:="No Group" OutlineShowAllTasks End Sub
Custom View Macro Sub MyCustomGantt() PaneClose ViewApply Name:="0b - Build Gantt Split" WindowActivate TopPane:=False ViewShowResourcesPredecessors End Sub
Resource Allocation Macro Sub ResourceAllocationWithGraph() ViewApply Name:="2c - Resource Allocation with Graph" SelectSheet OutlineHideSubTasks Sort Key1:="Start", Renumber:=False SelectResourceField row:=0, Column:="Name" GotoTaskDates End Sub
Deploying the Code Project Server Simple: Add the code module and views/macro buttons to the enterprise global. MS Project Client Only: Save a new global.mpt and distribute to your peers with intructions to replace their own global Careful! This will remove any of their own customizations (uncommon).
Free Code!!! Go to www.agisusa.com Go to Recordings and add the “VBA Macros and Toolbars” to your cart. Use “MPUG” at checkout to download it and a video for its usage for free.