Training, Consulting and PMO Augmentation

We Prevent Crunch and Project Crashes!

May 15, 2012
by admin
0 comments

VBA Script to open MS Project files

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.

May 14, 2012
by admin
0 comments

Adding notes to all non-summary tasks in project

Here is a quick view of how to add a note to all tasks (which are non-summary) in a project via VBA script

    Dim tsks As Tasks
    Dim t As Task

    Set tsks = ActiveProject.Tasks
   
    For Each t In tsks
        If (Not t Is Nothing) And (Not t.Summary) Then
            t.AppendNotes “This is the note”
        Else
            MsgBox “Summary Task :” & t.Name
        End If
    Next t

 

Objectives:

It allows PM’s to further extend it to tasks allocated to specific resource group (t.resourcename) or task with specific cost (t.ActualCost) etc.

 

Need more info?

Need Help!  We look forward to assist you master day to day tasks with MS Project.

 

May 9, 2012
by admin
0 comments

Date time command examples in 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.

April 18, 2012
by admin
0 comments

How to find total number of working days for all resource in active 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 availibility

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.

April 12, 2012
by soni
0 comments

Excluding tasks / resources from MS Project Leveling

Excluding tasks from MS Project Leveling

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:

  1. Go to “Resource Sheet”
  2. Insert a new column “Can Level”
  3. For resource you want to exclude from Leveling, select “No” in “Can Level” column value.

Option 2:

  1. Go to “Resource Sheet”
  2. Select resources you want to level (do not select resources you want to exclude from leveling)
  3. From “Resource Leveling” dialog click on “Level Now” button

 

exclude resource from schedule leveling

Resource exclusion from leveling

 

 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 From coming up dialog, select “Selected resources”

 

Resource exclusion from leveling

Resource exclusion from leveling

 

 

 

 

 

 

Need more info?

Need Help!  We look forward to assist you master day to day tasks with MS Project.

April 12, 2012
by admin
0 comments

Proposed and Committed resource types in 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.

options for Resource Leveling

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.

  1. Go to “Resource Sheet”
  2. Split the view
  3. From bottom pane, right click on Left bar and select “Resource Graph”
  4. Go to format tab and click on “Bar Style”.
  5. From coming up “Bar Style” dialog choose to display / do not display “Proposed Resources”

 

Proposed resource

Proposed resource

 

Need more info?

Need Help!  We look forward to assist you master day to day tasks with MS Project.

April 9, 2012
by soni
0 comments

Configuring MS Project to look for “Early Warning Signs” during Project execution.

 MS Project is a handy tool when it come to identify patterns which are typically early warning signs that needs to be addressed. 

 In this exercise, we will configure an early warning sign using custom field for following conditions: 

  1. Task Finish Date is within next seven days.
  2. [% Complete] on task is less than 30% 

RED Indicator 

  1. If [% Complete] on task is > 30% 

YELLOW Indicator 

  1. If task is neither ending next week 

GREEN Indicator

 

In order to configure check warning signals, we as PM can configure “Text1” field for formulas and graphical indicator as follow:

Formula:     

IIf(([Finish]-Date())<=7,IIf([% Complete]<=”30%”,”RED”,”NextWeek”),”LaterWeeks”) 

Graphical Indicator:

Graphical Indicators

Graphical Indicators for Early Warning Signs

 

 

 

 

 

 

Once above field is configured, MS Project automatically updates flag for PM to display early warning signal. 

Early Warning signs

Early Warning signs

 

 

 

Need more info?

Need Help!  We look forward to assist you master day to day tasks with MS Project.

 

 

 

 

 

 

April 9, 2012
by soni
1 Comment

Functions to manipulate Date and time in MS Project VBA

In today’s write out, we will explore few of the functions available in MS Project to manipulate Date and Time data in MS Project.

Msgbox DatePart(“yyyy”, “15/10/1998″)                     ‘returns 1998

—-
Msgbox DateDiff(“d”, “04/01/2012″, “04/05/2012″)               ‘ returns 4

—–

Msgbox DateSerial(2004, 6, 30)                              ’ returns 6/30/2004

—-

DateAdd ( interval, number, date )

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’
 
—-
MsgBox  TimeSerial(20 – 8, 6, 30)  ’would return 12:06:30 PM

—-

now    ’ would return mm/dd/yyyy hh:mm:ss [AM|PM]

—-

MonthName(3, TRUE)  ’ would return ‘Mar’
MonthName(7, FALSE)  ’ would return ‘July’

—-
WeekdayName(3, TRUE, vbMonday)  ’ would return ‘Wed’
WeekdayName(3, TRUE, 2)  ’ would return ‘Wed’

—-

msgbox Year(#5/4/2012#)                    ‘ would return “2012″

April 9, 2012
by admin
0 comments

“Text wrap” for column text in MS Project

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.

  • March 27, 2012
    by admin
    0 comments

    Searching tasks of 1 day duration in project schedule

    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.

    Searching project schedule for one day tasks

    VBA Script to Search project tasks of one man day

     

    Output:

    Searching project schedule for tasks duration

    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.

    March 27, 2012
    by soni
    0 comments

    Day to day operations in MS Project with VBA

    As MS Project users, we are comfortable applying common actions like “Split view”, “Apply filter”.   

    This short writeout talks about above actions implementation via VBA Script.

    VBA Script to Split current View:

     

    VBA Script to Split current View

    VBA Script to Split current View

     

     

    The following script Applies “Critical” filter to current project view:

    ActiveProject.TaskFilters(“Critical”).Apply

    Save baseline and Delete baseline from active project:
    Save baseline and delete baseline from active project
    Save baseline and delete baseline from active project

    Need more info?

    Need Help!  We look forward to assist you master day to day tasks with MS Project.

    March 26, 2012
    by soni
    0 comments

    Confused where to look for MS Project 2007 commands in MS Project 2010

    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

    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.

    March 26, 2012
    by soni
    0 comments

    Project management with MS Project 2010

    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.

    March 24, 2012
    by soni
    0 comments

    MS Project Calendars

    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

    Project Calendar > Resource Calendar > Task Calendar

    Scheduling of tasks:

    • 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.

    March 22, 2012
    by admin
    0 comments

    Day to day keyboard shorts in MS Project

    Here are some of the keyboard shortcuts i found important while working with MS Project on a day to day basis:

    Open new window :             Shift + F11

    “Column Definition”:         ALT + F3

    X Information:                    Shift + F2

    Where X = Resource, Task, Assignment

    Hide subtasks:     ALT + SHIFT + HYPHEN

    Show subtasks:    ALT + SHIFT + + (plus symbol on keyboard)

    Show all tasks:     ALT + SHIFT + *  (Asterix symbol on keyboard)

    Indent / Outdent selected Tasks:      ALT + SHIFT + RIGHT / LEFT Arrow key

    Fill down:              Select the entry to fill and CTRL + D

    Link Tasks:           CTRL + F2

    Unlink Tasks:       CTRL + SHIFT + F2

    Bring focus to first selection:             SHIFT + BACKSPACE

    Move Timescale left:          ALT + LEFT ARROW KEY

    Move Timescale right:        ALT + RIGHT ARROW KEY

    Select a column:  CTRL + SPACE BAR

    Select all rows / columns:   CTRL + SHIFT + SPACE BAR

    Need more info?

    Need Help!  We look forward to assist you master day to day tasks with MS Project.

    March 22, 2012
    by soni
    1 Comment

    Creating custom reports in 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

    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

    Class structure to create custom reports in MS Project

    Actual code in MS Project function to write report contents:

    Report script contents

    Contents of report script

     

    Once this is done and triggered action / macro is executed, one can see the report as follow:

    Output Report

    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.

    March 21, 2012
    by soni
    0 comments

    Understanding impact of resource availability on Schedule

    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:

    Project schedule

    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:

    availability of resource to project

    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:

    Updated Project schedule with non available resource

    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.