Effort_Driven Calculates Incorrectly If Hours Greater Than 547

Q124031

kbprg kbcode
The information in this article applies to:


SYMPTOMS

The Effort_Driven scheduling macro does not function correctly for a work value greater than or equal to 547 hours. When you run this macro for a task that has a total amount of work greater than or equal to 547h, the results will be inconsistent.

NOTE: This problem does not occur in Microsoft Project for the Macintosh version 4.0.


CAUSE

This problem occurs because the variable for work is declared as type Integer, which means that the limit for the value of work is 32,767/60 or 546 hours (note that the integer value is divided by 60 because work is returned in minutes).


WORKAROUND

To work around this problem, follow the procedure below to declare nTaskWork at type Long:

  1. From the Tools menu, choose Macros, select the Effort_Driven macro and then choose Edit.


  2. From the Edit menu, choose Find, and search for the Variable Declarations section.


  3. In the Variable Declarations section, change the following line
    
    Dim nTaskWork as Integer 
    to:


  4. 
    Dim nTaskWork as Long 
Microsoft provides examples of Visual Basic procedures for illustration only, without warranty either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. This Visual Basic procedure is provided 'as is' and Microsoft does not guarantee that it can be used in all situations. Microsoft does not support modifications of this procedure to suit customer requirements for a particular purpose.

Additional query words: 547h

Keywords :
Issue type : kbbug
Technology : kbProjectSearch kbProject400


Last Reviewed: November 5, 2000
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.