Microsoft KB Archive/137845

= PRJ: PERT Analysis Fails If Subproject Task Is Demoted =

Article ID: 137845

Article Last Modified on 6/23/2005

-

APPLIES TO


 * Microsoft Project 4.0 Standard Edition
 * Microsoft Project 4.1 Standard Edition
 * Microsoft Project 4.0 for Macintosh

-



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.

 On the Tools menu, click Macros. Click the Calculate_Pert macro, and click Edit. In the Module Editor, click Find on the Edit menu. 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  Change the following line      If Not oTaskRef.Summary and oTaskRef.Subproject = "" then to:      If Not oTaskRef.Summary Then </li> Repeat Step 4 to find Start2/Finish2 and Start3/Finish3 and modify the line in Step 5 for each of these sections.</li></ol>

<div class="status_section">

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

Additional query words: Run time error 5 Invalid Procedure Call

Keywords: kberrmsg kbbug kbmacro kbprogramming kbpending KB137845

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.