Here is a simple script which open MS Project file from local system for further editing. One need to copy and paste below code into a vbs file on local system and execute it to get the results.
VBA Script:
Dim appProj
Dim aProg
Set appProj = CreateObject(“Msproject.Application”)
appProj.FileOpen “c:\sr-temp\Project1.mpp”
Set aProg = appProj.ActiveProject
appProj.Visible = True
Result:
MPP file at given path is opened on execution of vbs file stored with above code.
Need more info?
Need Help! We look forward to assist you master day to day tasks with MS Project.
MsgBox “Today’s Date is : ” & Date
MsgBox “Now the time is : ” & Time
MsgBox “Adding 1 month to today’s date will get : ” & DateAdd(“m”, 1, Date)
MsgBox “Adding 1 day to today’s date will get : ” & DateAdd(“d”, 1, Date)
MsgBox “Adding 1 year to today’s date will get : ” & DateAdd(“yyyy”, 1, Date)
MsgBox “Adding 1 week to today’s date will get : ” & DateAdd(“ww”, 1, Date)
MsgBox “Adding 1 Quarter to today’s date will get : ” & DateAdd(“q”, 1, Date)
MsgBox “Adding 1 hour to current time will get : ” & DateAdd(“h”, 1, Time)
MsgBox “Adding 1 Quarter to today’s date will get : ” & DateAdd(“q”, 1, Date)
MsgBox “No. of minutes between now and 1 day after : ” & DateDiff(“n”, Date – 1, Date)
MsgBox FormatDateTime(“05/08/2012″, 1) ‘ — Returns Tuesday, May 08,2012
MsgBox FormatDateTime(“05/08/2012″, 2) ‘ — Returns 5/8/2012
MsgBox FormatDateTime(“05/08/2012 16:08:55″, 3) ‘ — Returns 4:08:55 PM
MsgBox FormatDateTime(“05/08/2012 16:08:55″, 4) ‘ — Returns 16:08
MsgBox DatePart(“n”, “05/08/2012 16:08:55″) ‘– Returns 8
MsgBox MonthName(2) ‘– Returns February
MsgBox Timer ‘– Returns No. of seconds since midnight
MsgBox WeekdayName(1) ‘– Returns weekday based on first day of week as sunday
MsgBox WeekdayName(1, False, 2) ‘– for Monday as first day of week (2 option), returns first day of week as Monday.
MsgBox WeekdayName(1, True) ‘– Returns Sun for sunday, Mon for monday, Tue for tuesday
MsgBox Weekday(“05/08/2012″) ‘ — Returns Wednesday
MsgBox Time ‘– Returns 4:31:34 PM
MsgBox Now ‘– Returns 5/8/2012 4:31:34 PM
MsgBox Year(“05/08/2012″) ‘ — Returns 2012
MsgBox Second(“5/8/2012 4:31:34 PM”) ‘– Returns 34
MsgBox Month(“5/8/2012 4:31:34 PM”) ‘– Returns 5
MsgBox Minute(“5/8/2012 4:31:34 PM”) ‘– Returns 31
MsgBox Hour(“5/8/2012 4:31:34 PM”) ‘– Returns 16
MsgBox Day(“5/8/2012 4:31:34 PM”) ‘–Returns 8
MsgBox DatePart(“q”, Now) ‘– Returns 2 (2nd Quarter)
Need more info?
Need Help! We look forward to assist you master day to day tasks with MS Project.
finding number of working days for a resource is tiresome and if count of such resources is big, Project managers are at helm of tasks that needs to be undertaken to identify man hours available and other project related durations.
In this sample VBA, a project manager can make use of VBA capabilities of MS Project to get number of working days related details from current schedule.
Resource availability in a year
Result:
this report for all available resources in active project the number of working days he is available from January 1 to 31st December.
This can be further customized to find man hours available and track man hours needed for project.
Need more info?
Need Help! We look forward to assist you master day to day tasks with MS Project.
If the priority number for a task is 1000, MS Project will not delay the task and excludes it from the leveling process .
Excluding resources from MS Project Leveling
As a project manager efforts spend by any 3rd party contracted work which is not tracked directly by project, can be excluded from MS Project leveling.
Option 1:
Go to “Resource Sheet”
Insert a new column “Can Level”
For resource you want to exclude from Leveling, select “No” in “Can Level” column value.
Option 2:
Go to “Resource Sheet”
Select resources you want to level (do not select resources you want to exclude from leveling)
From “Resource Leveling” dialog click on “Level Now” button
Resource exclusion from leveling
From coming up dialog, select “Selected resources”
Resource exclusion from leveling
Need more info?
Need Help! We look forward to assist you master day to day tasks with MS Project.
“Booking Type” for a resource can be “Committed” or “Proposed”. So what does different types of resource booking means:
Committed: A resource that is formally allocated to any task assignments they have within a project. This is the default booking type.
Proposed: A resource with a pending resource allocation to a task assignment that has not yet been authorized. This resource assignment does not detract from the availability of the resource to work on other projects.
Take following steps to configure inclusion / exclusion of “Proposed Resources” in “Resource Availability graphs”, “Resource Leveling” operations:
Including / excluding proposed resources for “Resource Levelling” operations:
Following settings in “Resource Leveling” dialog box configures inclusion / exclusion of resources while leveling them.
Resource Leveling
When “Level resources with the proposed booking type” option above is unchecked, proposed resources are not taken into consideration when leveling. When checked, then tasks using proposed resources as well as confirmed resources are considered in the leveling process.
Configuring inclusion / exclusion of proposed resources in “Resource graph”:
Project manager can follow below steps to configure display of proposed resources in “Resource Graph” view.
Go to “Resource Sheet”
Split the view
From bottom pane, right click on Left bar and select “Resource Graph”
Go to format tab and click on “Bar Style”.
From coming up “Bar Style” dialog choose to display / do not display “Proposed Resources”
Proposed resource
Need more info?
Need Help! We look forward to assist you master day to day tasks with MS Project.
where interval can be: yyyy for Year, q for Quarter, m for Month, y for Day of the year, d for Day, w for Weekday, ww for Week, h for Hour, n for Minute, s for Second
Msgbox DateAdd(“q”, 2, “22/11/2003″) would return ’22/05/2004′
Msgbox DateAdd(“m”, 5, “22/11/2003″) would return ’22/04/2004′
—-
Date ’ returns current system date eg. 5/4/2012 (5th april, 2012)
Msgbox Date()
—-
Format(Date, “yyyy/mm/dd”) ’ returns date as “2012/04/05″
s = (Format(#4/17/2004#, “yyyy/mm/dd”))
MsgBox s ‘ returns date as “2004/04/17″
—-
MsgBox MonthName(3, True) ’Would return ‘Mar’
MsgBox MonthName(7, FALSE) ’would return ‘July’
In MS Project, you one can split view via “Window” -> “Split Window” option (MS Project 2007) or “View tab” and “Select a view” from “Details” drop down.
MS Project also provides a short cut key, where in a user can KEEP the SHIFT key pressed and select a view from “View” tab
This is a link to KB Support from Microsoft on “Text Wrapping” support in MS Project 2010.
On entering a long text in MS Project field (associated to table view etc), MS Project generally do not support “Text Wrapping” to multiple lines. As per the above KB Support available here, Starting MS Project 2010, Text wrapping is supported only if:
The row height is set to a number greater than 1.
The column width is too narrow to display all the text on one line.
The column is Left aligned. (This does not apply to Microsoft Project 2002, Microsoft Office Project 2003, or Microsoft Office Project 2007.)
The text includes spaces between words.
As per note further to this, text wrap is applicable for long text with space in between words. if your is a long word, text wrap may not be effective.
Microsoft ALM Rangers have come up with beta of “Practical Kanban” guidance, hands on lab and process templates to implement Kanban in Team Foundation Server 2010 and Team Foundation Server 2012.
This is a big start from Microsoft side towards lean implementation. The details can be found here.
In order to optimally load resources to tasks, Project manager need to search for small duration and large duration tasks in entire project. This can be achieved by applying filtering.
This can be done with VBA Script as follow. here Project manager want to search a task of 480 minutes (Hours per day settings at project level configuration settings) i.e. tasks of one man day duration.
VBA Script to Search project tasks of one man day
Output:
Searching project schedule for tasks duration
Need more info?
Need Help! We look forward to assist you master day to day tasks with MS Project.
As new users for MS Project 2010 (considering we have worked with 2007 exhaustively), project managers find it difficult to find a specific command which exists in MS Project 2007 in MS Project 2010 ribbon view.
while working on above pointer, i found an interesting online interactive tool to locate commands location in MS Project 2010. This tool can be found here.
From Left menu click on “MS Project” and click “Run the Project interactive guide” hyperlink as follow:
find your favorite commands on the ribbon in Project 2010
Using this tool, users can select a MS Project 2007 menu and tool will pin point where to look for same command in MS Project 2010 ribbon interface.
Need more info?
Need Help! We look forward to assist you master day to day tasks with MS Project.
MS Project 2010 documentation comes with printable guide that gives and overview step of how to use MS Project to manage a project from Start to finish.
I found this guid helpful and interactive. This downlodable guide available here cover all aspects to manage a project
Start a new Project
Plan tasks
Assign resources
Set baseline
Update Progress
View or create reports
Finish project
Need more info?
Need Help! We look forward to assist you master day to day tasks with MS Project.
MS Project allows schedule control at three levels, Project level, resource level and task level.
Project calendar or base calendar is default calendar for all resources and tasks on project which specifies default working and non working time for set of resources.
Resource calendar defines working and non-working time for individual resources.
Task Calendar when assigned to individual tasks controls scheduling of individual tasks.
Note:
MS Project calculates schedule for tasks and resources in following order of precedence
If a task has no resources and no task calendar, it is scheduled according to the project calendar.
If a task has resources assigned and no task calendar, it is scheduled according to the resource’s resource calendar.
NOTE: If you don’t want the resource calendar to change the scheduling of the task, select the Scheduling ignores resource calendars check box.
Scheduling of Resources:
If the resource does not have a resource calendar, the project calendar
is used.
Microsoft Project automatically creates a “Resource Calendar” based on Project calendar, as specified in the Project information dialog box for each new resource added to resource sheet. If you define a new base calendar for a resource, and modify the non-working time in the new base calendar, but do not base the resource calendar on the new base calendar, it will look as though the calendar settings you entered were ignored. By default, MS Project, will base the resource calendar on the project calendar, unless you specify otherwise.
To resolve this, associate the new base calendar to resource’s calendar as follow:
1.On the View menu, click Resource Sheet.
2.Click a resource name, and then click Resource Information .
3.On the General tab, click Change Working Time.
4.In the Base Calendar field, click the name of the new base calendar that you
created.
5.Enter the nonworking days and times for the resource.
Any changes made to working and non working time of a resource will make changes to resource calendar accordingly.
Need more info?
Need Help! We look forward to assist you master day to day tasks with MS Project.
It is generally a observed that project managers need to fetch data from MS Project plan at random request and make an analysis for presentation. In this write out, we are going to suggest method to create custom reports using VBA.
In order to create a report, we need to define a class with constructor, destructor and function with objective as defined below:
Pseudocode for class structure:
Class Structure()
Constructor() : defines Report Header
Function WriteF() : Appends to end of file
Destructor() : defines Report Footer
End class
Sample report structure can be as follow:
Generating report using VBA in MS Project
Once the report requirements (like above) are finalized we can write functions in MS Project to iterate through tasks and find variables at run time to create report contents. The pseudocode to generate report contents can be as follow:
Pseudocode to generate report content:
For each Task in current project
var a = task.name
var b = task.cost
var c = task.variance
….
Writef(a, b, c …..)
Next Task
Once we are done, we can actually sit down to write custom report. Sample project report with header, footer and report contents is here for ready reference:
Actual code of Class
Class structure to create custom reports in MS Project
Actual code in MS Project function to write report contents:
Contents of report script
Once this is done and triggered action / macro is executed, one can see the report as follow:
Output report file as generated with VBA code
Need more info?
Need Help! We look forward to assist you master day to day tasks with MS Project.
Project schedule is dependent on multiple factors:
a. Duration and working-time period: For a project of x duration, if all the time period is working the project should end by end of xth day from start date of project.
b. Task dependency: the task may depend on previous tasks, if they complete as planned, the project should complete by identified end date.
Also, resource availability impact project schedule. To understand this, let’s create a simple project schedule with two tasks as follow:
understanding impact of "Resource Availability" on project schedule
From above, as both the resources are available, the entire project should end in one working day.
Assume, for above date (21st March, 2012), resource “B” is unavailable to project. To make this resource unavailable for 21st March, double click resource “B” from Resource sheet and enter availability from 22nd March as follow:
Understanding impact of resource availability on Project Schedule
On levelling resource (if project level setting is not set to “Manual”) in above case, MS Project automatically calculates the new schedule (adjusting resource availability) to March 23rd, 2012:
Project schedule as calculated by MS Project, based on resource availablility
Need more info?
Need Help! We look forward to assist you master day to day tasks with MS Project.