PRJ: PERT Analysis Fails If Subproject Task Is Demoted (137845)



The information in this article applies to:

  • Microsoft Project for Windows 4.0
  • Microsoft Project for Windows 95 4.1
  • Microsoft Project for the Macintosh 4.0

This article was previously published under Q137845

SYMPTOMS

When you use the PERT Analysis macro, the following error message is displayed:
Run-time error'5' Invalid Procedure Call

CAUSE

The PERT Analysis macro will fail if you use it with projects that contain demoted subproject tasks. The PERT Analysis macro ignores subprojects when it attempts to calculate Start and Finish dates. This behavior causes unexpected values to be rolled up to the Summary task, and it forces the macro to fail.

RESOLUTION

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
To resolve this problem, use the following steps to modify the Calculate_Pert macro for use with demoted subprojects. Note: you may want to create a backup copy of the macro before making modifications.

  1. On the Tools menu, click Macros.
  2. Click the Calculate_Pert macro, and click Edit.
  3. In the Module Editor, click Find on the Edit menu.
  4. In the Find What field, type Start1/Finish1.

    Find locates the line that reads 'Copy calculated Start/Finish Fields (most optimistic case) into Start1/Finish1
  5. Change the following line
          If Not oTaskRef.Summary and oTaskRef.Subproject = "" then
    						
    to:
          If Not oTaskRef.Summary Then
    					
  6. Repeat Step 4 to find Start2/Finish2 and Start3/Finish3 and modify the line in Step 5 for each of these sections.

STATUS

Microsoft has confirmed this to be a problem in the versions of Microsoft Project listed above.

Modification Type:MajorLast Reviewed:6/23/2005
Keywords:kbbug kberrmsg kbmacro kbpending kbProgramming KB137845