Microsoft KB Archive/169233

PRJ41: Contents of the Samples.wri Readme File

PSS ID Number: Q169233 Article last modified on 11-14-1997

4.00 4.10 4.1a

WINDOWS

================================================================ ==

The information in this article applies to:

 == Microsoft Project for Windows, versions 4.1, 4.1a == 

= SUMMARY =

The Samples.wri file contains supplemental information about the macros that are shipped with Microsoft Project, versions 4.1 and 4.1a. The “More Information” section of this article contains the complete text of this file, which can be found in the folder where you installed Microsoft Project.

= MORE INFORMATION =

Using the Sample Visual Basic for Applications Macros and Visual Basic Tools

DISCLAIMER OF WARRANTY THE SAMPLES DESCRIBED IN THIS DOCUMENT ARE UNDOCUMENTED SAMPLE CODE. THESE SAMPLES ARE PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND. MICROSOFT FURTHER DISCLAIMS ALL IMPLIED WARRANTIES INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR OF FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK ARISING OUT OF THE USE OR PERFORMANCE OF THE SAMPLES RE-MAINS WITH YOU. IN NO EVENT SHALL MICROSOFT OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THE SAMPLES, EVEN IF MICROSOFT HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. BECAUSE SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, THE ABOVE LIMITATION MAY NOT APPLY TO YOU.

Microsoft Project version 4.1 provides two sets of additional functions:

  Visual Basic for applications macros   Visual Basic tools VISUAL BASIC FOR APPLICATIONS MACROS 

The following macros created in Visual Basic for applications (VBA) provide additional functionality for Microsoft Project version 4.1. These macros also can provide a guideline for adapting or creating your own macros:


 * Accept All Updates Macro
 * Adjust Dates Macro
 * Date Range From Today Filter Macro
 * Effort-Driven Scheduling Macro
 * Format Duration Macro
 * Improved Rollup Macro
 * Inflation Factors Macro
 * Pivot Tables Macro
 * Tracking Macro

For more information about creating your own macros, see Chapter 16, “Automating Your Work,” in the Microsoft Project User’s Guide, or online Help for Visual Basic for applications.

Accept All Updates Macro
The Accept All Updates macro allows users to automatically incorporate all of the update messages in the inbox of their electronic mail into the appropriate project files. It also serves as an example of using VBAMAP32.DLL to write to the Messaging API supported by Microsoft Exchange.

To use the Accept All Updates macro:


 * 1) Open Microsoft Project.
 * 2) From the Tools menu, choose Macros.
 * 3) From the Macro Name list, select AcceptAllUpdates.
 * 4) Choose the Run button.
 * 5) For each update message in your inbox, choose Yes if you would like to incorporate the updates from the message into your project.

Due to data structure differences, you cannot write directly to MAPI from VBA. To write to MAPI, use VBAMAP32.DLL instead. VBAMAP32.DLL will pass your calls to MAPI and ensure that the data transfers correctly between your macro and the MAPI library.

When writing your own macro that uses MAPI, use the declarations at the top of the AcceptAllUpdates macro (between the beginning of the module and the End VBAMAPI.BAS comment) in your declarations to ensure that you write correctly to the VBAMAPI.DLL. The AcceptAllUpdates macro can serve as a good guide for how to establish a MAPI session from within Microsoft Project and how to use common MAPI calls from within VBA. For additional information about MAPI, see your MAPI technical documentation.

Adjust Dates Macro
The Adjust Dates macro allows you to enter a new start date for your project. It will then go through the project and adjust any tasks which are constrained to dates so that the constraint date occurs at the same place in the project relative to the new start date. If the project is scheduled from the finish date, then you can use the macro to enter a new finish date instead of a new start date. After you enter a new start or finish date for the project, the macro adjusts the date of the constraint by the difference between the original start or finish date and the new start or finish date.

For example, if a project that starts on 1/1/95 has a task that is constrained to the date 1/2/95, and you run the macro and enter 1/8/95 as the new start date for the project, the constraint date on the task will be adjusted to 1/9/95.

To use the Adjust Dates macro:


 * 1) Open Microsoft Project and a project for which you want to adjust the start or finish date.
 * 2) From the Tools menu, choose Macros.
 * 3) From the Macro Name list, select AdjustDates.
 * 4) Choose the Run button.
 * 5) Enter the new start or finish date for your project.
 * 6) Choose the OK button.

Date Range From Today Filter Macro
The Date Range filter included with Microsoft Project version 4.1 requires you to know the exact dates for which you want to filter. For users who think of project dates in terms of their relation to today, an enhancement to the Date Range filter allows these users to use the Date Range From Today macro to specify, for example, that the filter start 8 days and end 12 days from today.

To use the Date Range From Today Filter macro


 * 1) From the Tools menu, choose Macros.
 * 2) From the Macro Name list, select DateRangeFromToday.
 * 3) Specify the range of the number of days before or after the current date for which you want to apply the Date Range filter.
 * 4) Choose the OK button.

Effort-Driven Scheduling Macro
The Effort-Driven Scheduling macro allows users to change the resources assigned to a task without affecting the total amount of work for the task. For example, for a task that has 32 hours of work that will take one resource 4 days to complete, you can use the Effort-Driven Scheduling macro and assign another resource to the task, so that the task will still have 32 hours of work, but will only take 2 days to be completed.

To use the Effort-Driven Scheduling macro:


 * 1) Select one or more tasks for which you want to change the resource assignments without changing the total amount of work for each task.
 * 2) From the Tools menu, choose Macros.
 * 3) From the Macro Name list, select Effort_Driven.
 * 4) Add, remove or change any of the resource assignments for each task.
 * 5) Choose the OK button.

Troubleshooting

If any actual work was entered for a task, or if the task was a fixed duration task, the macro will prompt you to skip that task before allowing you to change its resource assignment information. The Effort-Driven macro automatically skips summary tasks and subproject tasks. If the selected task did not have any resource assignments, and so had a zero work value, after you assign one or more resources to the task the macro will leave the new work value and will not replace it with the zero, the old work value.

Format Duration Macro
The Format Duration macro goes through your project and changes all durations to the same unit. The Format Duration macro is useful when you want to clean up your project for presentation. For example, if you have estimated durations in hours and days, but want to display all of your durations in weeks, you can run the Format Duration macro and change all of the durations displayed in hours and days to weeks.

Be aware that if you are converting a small unit to a larger unit, it is possible that rounding errors may occur. For example, if you are converting 15 minutes to days, the result is 0.03125 days. Since Microsoft Project only displays durations to two decimal places, this conversion would be rounded to .03 days. If you then converted .03 days back to minutes, the result would be 14.4 minutes. But since Microsoft Project does not display partial minutes, the duration would be rounded down to 14 minutes, instead of the original 15 minutes.

NOTE: You cannot use this macro if a duration is a linked field because the Format Duration macro cannot change the duration units in fields outside Microsoft Project.

To use the Format Duration macro


 * 1) Open the project for which you want to format the durations in the same unit.
 * 2) From the Tools menu, choose Macros.
 * 3) From the Macro name list, select FormatDuration.
 * 4) Choose the Run button.
 * 5) In the Microsoft Project dialog box, enter the duration unit in which you want all of the durations to be displayed. Enter a duration to display: m for minutes, h for hours, d for days, or w for weeks.

Improved Rollup Macro
The Rollup macro is similar to the Rollup macro included with Microsoft Project version 3.0. The Rollup macro resets all Flag10 fields so that attached text on rollup bars alternates from top to bottom, but also uses direct formatting to hide summary bars.

To use the Improved Rollup macro:


 * 1) Open the project for which you want to change the rollup bars.
 * 2) For each task you want to roll up, select the task and from the Insert menu, choose Task Information. Select the Rollup Gantt Bar To Summary check box, and then choose the OK button.
 * 3) From the Tools menu, choose Macros.
 * 4) From the Macro name list, select RollupFormatting.
 * 5) Choose the Run button.
 * 6) Choose to show the rollups either as symbols or as bars. If you choose bars, the rollups show as bars on the summary task when the outline is collapsed to show only summary tasks. If you choose to show Milestones, milestone symbols are shown.

Inflation Factors Macro
Inflate.xlm is a set of Microsoft Excel version 7.0 macros that works with Microsoft Project version 4.1 to simulate variable resource rates. For each task, the macro uses variable resource rate information entered in an “inflation worksheet” to compute the “inflated” cost of the task, and then adjusts the fixed cost of the task to account for the difference from the task’s original cost. You can enter the variable resource rate tables manually, or you can let the program fill in the tables based on periodic change information that you specify, for example, “standard rate increases by 10% per year for 5 years.” The variable resource rates on the inflation worksheet do not become part of the resource information in Microsoft Project, because Microsoft Project only has one Standard Rate, Overtime Rate and Cost Per Use field. However, pictures of the rate tables can be pasted as objects into the Objects box of the Resource Form.

The Inflation Factors macro has five distinct commands:


 * New Inflation Worksheet
 * Calculate Rates
 * Attach Rate Tables
 * Calculate Inflated Costs
 * Restore Original Costs

You can use the macro by opening Inflate.xlm in Microsoft Excel version 7.0. An Auto_Open macro automatically adds commands to the File and Data menus as described above. The Attach Rate Tables, Calculate Inflated Costs, and Restore Original Costs commands assume that Microsoft Project is running and the correct project is active. These commands also assume that the standard filters, tables, and views are available. All standard and overtime rates are assumed to be per hour.

To use the Inflation Factors macro:

  Open Microsoft Project version 4.1 and a working copy of your project. The project should contain resources and resource assignments.   Open Microsoft Excel version 7.0.   From the Library directory of Project, open Inflate.xlm. </li>  In Excel, open a previously saved inflation sheet, or use the New Inflation Worksheet command on the File menu to create a new one. </li>  To add or edit rate information, manually fill in additional effective dates and rates in the rate tables, or use the Calculate Rates command on the Data menu. </li>  From the Data menu, choose Calculate Inflated Costs. NOTE: If you had used this command previously on the active project, you should first use the Restore Original Costs command on the Data menu. </li>  If you want to paste or paste link the rate tables as objects attached to the resources, from the Data menu, choose Attach Rate Tables. COMMAND DESCRIPTIONS </li></ol>

New Inflation Worksheet Command (available on the File menu)
Before using this command, you must have a project containing at least one resource open in Microsoft Project. It is recommended that you use a working copy of the original project. The command uses information from the active project to create a new inflation worksheet and saves the new sheet under the same name as the active project, with the extension .XLS, in the same directory as the active project.

The New Inflation Worksheet Command sets up a variable resource rate table for each resource. The project itself determines the information in the first period, which starts on the project start date. The resource’s Standard Rate, Overtime Rate, and Cost Per Use fields in Project are used for the rates in the first period.

After the new inflation worksheet is created, the user can fill in manually additional effective dates and variable rates in the tables. Each date represents when the rates below it become effective. The date lines must end with the word “END”. Rates below or to the right of “END” are ignored. Each table can have different dates and a different number of periods. Dates must be in whole days, ascending order, and in the range 1/1/1984 - 12/31/2049. Rates can be positive or negative and may vary up or down with time. The magnitude of rates and computed cost results cannot exceed $999,999,999,999.99. If you manually enter a rate, enter only the number (not the "$ &quot; or the “/h”).

See the Calculate Rates command below for an automated method of filling in the tables.

Calculate Rates Command (available on the Data menu)
The Calculate Rates command fills in rate tables with additional effective dates and rates based on periodic change information supplied by the user. This is an alternative to entering the variable rate information manually. Microsoft Project does not have to be running to use this command, but a valid inflation worksheet must be active.

Under Fields To Calculate, specify what kind of rates to calculate (Standard, Overtime, and/or Cost Per Use). At least one of these must be selected.

Under Increase By, specify an “amount” and “type” of change. The Type list contains the choices Percent Annually, Percent Per Period, or Units Per Period. For types involving a percentage, enter a percentage in the Amount box. For the Units Per Period type, the number in the Amount box can be positive or negative, but not zero. A negative number in Units Per Period indicates decreases in rates with time, and a negative percentage indicates a reduction in magnitude of the rates with time.

You can specify the period size by entering an integer greater than or equal to 1 under Count and selecting weeks, months, quarters, or years from the Units list.

You can specify the number of additional periods (1 to 251).

You can choose to calculate rates for one selected resource versus all resources.

The macro does some data validation immediately after choosing the OK button, and will return to the dialog to allow some kinds of corrections. However, if the information from the worksheet and dialog results in calculated dates outside 1/1/1984 - 12/31/2049, or calculated rates with magnitude exceeding $999,999,999,999.99, the offending cells are filled with “#NUM!”. You are given a chance to undo all changes if such errors occur.

Attach Rate Tables Command (available on the Data menu)
As an option, you can Paste or Paste Link resource rate tables from the inflation worksheet into the object area of the resources in the active project. There is a check box to overwrite (replace) existing objects (versus appending them). You can choose to attach rate tables for one selected resource or all resources. To see the results of this command, go to Microsoft Project and look at the Objects box in the Resource Form.

Calculate Inflated Costs Command (available on the Data menu)
This command adjusts the fixed cost of each task so the Cost field equals the inflated cost calculated from the variable resource rate information on the inflation worksheet. Costs due to regular work are prorated for each assignment using the standard rate for each period; costs due to overtime work are accrued at the end of each assignment using the overtime rate at that date; and cost per use is accrued at the start of each assignment using the cost per use at that date.

Performance Limitations

Because the Calculate Inflated Costs command calculates periodic assignment work using the TimescaledData method, the command slows dramatically as you increase the number of rate tables, the number of periods, the size of each period, and the number of assignments. Each additional rate in a rate table can involve the TimescaledData method - once for each assignment. One Inflation worksheet has room for 2729 resource tables. Resource IDs must start in cell R6C1 and occur every 6 rows. The first blank Resource ID marks the end of the data.

Details

For each resource on the worksheet, for each additional period in its rate table, and for each task it is assigned to, the corresponding work is computed using the TimescaledData method. The case of a resource assigned multiple times to the same task is correctly handled. The regular work done on that task, by that resource, and for that period is summed up (overtime work for that period is correctly deducted from the Resource Usage work). To get the cost change, the standard rate for the period minus the Standard Rate in Microsoft Project is multiplied by the regular work for the period. For each of the resource’s assignments that finishes during the period, the overtime rate for the period minus the Overtime Rate in Microsoft Project is multiplied by the overtime work and added to the cost change. For each of the resource’s assignments that starts in the period, the cost per use for the period minus the Cost Per Use in Microsoft Project is added to the cost change. The cost change is then added to the Fixed Cost field of the task.

To see the results of this command, go to Microsoft Project and apply the Task Sheet view and the Cost table. You may want to insert the Number5 column in the Cost table so you can compare the original fixed costs stored in the Number5 column with the new inflated Fixed Cost field.

IMPORTANT: Before you use the Calculate Inflated Costs command the next time, you must use the Restore Original Costs command. The Calculate Inflated Costs command copies the Fixed Cost field to the Number5 field as a backup. The Restore Original Costs command copies the Number5 field back to the Fixed Cost field.

Restore Original Costs Command (available on the Data menu)
This command restores the Fixed Cost of each task to its original value by copying the Number5 field to the Fixed Cost field in the active project. See the Calculate Inflated Costs command above.

Source Code

Below is a list of the sheets contained in the Inflate.xlm workbook and a brief description of their function:

Sheet Description —– ————

Module1 Contains all the procedures. Dialog1 Dialog box for the Calculate Rates command. Dialog2 Dialog box for the Attach Rate Tables command. Inflate Template inflation worksheet. Sheet1 Contains lists for Dialog1; also used by Calculate Rates to backup the rate tables so you can undo if errors occur.

Pivot Tables Macro
The Pivot Tables macro is a reporting macro that uses Microsoft Excel version 7.0 pivot tables to present information about a project. Most of the information that is presented is about resource assignments. Four pivot tables are produced, each on a separate sheet in the workbook. There is also a “source data” sheet, which contains the raw source data imported from Microsoft Project. The user could perform further analyses on this sheet.

To use the Pivot Tables macro:

<ol style="list-style-type: decimal;">  Open Microsoft Project and a project containing both tasks and resources on which you want to run the Pivot Tables macro. </li>  Choose Macros from the Tools menu. </li>  From the Macro Name list, select CreatePivotTables. </li>  Choose the OK button. NOTE: You can also run the Pivot Tables macro by clicking the Task Assignment Table button on the Resource Management toolbar. </li></ol>

About the Matrices

Assignment Matrix. This is a straightforward matrix that shows which resources are assigned to a task. If a task has no resources assigned to it, the Assignment matrix will show an X under the No Assigned Resources column. If a task has a fixed cost, an X will be shown under the Fixed Cost column.

Duration Matrix. This matrix shows the duration of a resource assignment to a given task. Currently, this does not show assignment- level information. Instead, what you see is the scheduled, actual, and baseline duration for the task.

Work Matrix. The tables show Actual, Baseline, and Remaining values for duration, cost, and work. This is assignment-level information that shows only the specific resource’s work on a given task. To obtain the total work for all resources on the task, the user should total the entire row for the task.

Cost Matrix. The tables show Actual, Baseline, and Remaining values for duration, cost, and work. Similar to the Work Matrix, this is an assignment-level report.

Fixed costs are reported as though they were assigned to a resource called “Fixed Cost.” If a task has a fixed cost associated with it, then the Assignment Matrix will show an X for Fixed Cost. If a task has a fixed cost, the task’s work and duration totals get shown in the Fixed Cost column. In the Cost Matrix, the actual and baseline fixed costs for a given task will be displayed.

Currently, tasks are shown according to summary level. The first column shows the summary task (if present). The next column shows the subordinate tasks. Subsequent columns show the actual matrix of resource information. Tasks are sorted alphabetically.

Troubleshooting

The Pivot Tables macro may stop before generating any tables and show the message:

An error has occurred during macro execution. This macro will close now. Please try again.

This error can be generated if you do not have enough worksheets in a new Microsoft Excel workbook. This macro requires at least 5 worksheets in a new workbook to function properly. To check whether you have enough worksheets in a new workbook, in Microsoft Excel, choose Options from the Tools menu. Select the General tab. Make sure the Sheets In New Workbook setting is 5 or greater. Choose the OK button. In Microsoft Project, rerun the Pivot Tables macro.

When running the Pivot Tables macro on a large Microsoft Project file, Microsoft Excel may start flashing. If Microsoft Excel is flashing, switch to Microsoft Excel using ALT+TAB or the Task Manager. A dialog box may be present in Microsoft Excel stating Selection too large. Continue without undo? Choose the OK button on this and any subsequent dialog boxes and the Pivot Tables macro will continue. This message may appear numerous times during the execution of the macro.

Tracking Macro
The Tracking macro gives you a batch method for displaying the Update Tasks form for all tasks or for a selection of tasks that occur in a specific time period. Without using the Tracking macro, you have to select each task you want to update, or view and display the Update Tasks dialog box.

To use the Tracking macro:

<ol style="list-style-type: decimal;">  Open Microsoft Project and a project on which you want to run the Tracking macro. </li>  From the Tools menu, choose Macros. </li>  From the Macro Name list, select TaskUpdate. NOTE: You can also access the macro by clicking any toolbar with the secondary mouse button, choosing Tracking from the shortcut menu. Then click the Update Task Range button on the Tracking toolbar. </li>  The macro prompts if you would like to update all tasks or a filtered list. If you choose to update all tasks, the macro displays the Update Tasks dialog box for all tasks except Summary Tasks, Milestones, Completed Tasks, or Subproject Tasks. If you choose to update a filtered list, you are prompted to enter a date range in the Date Range filter. Once you enter a date range, the Update Tasks dialog box is displayed for each appropriate task in the specific date range. </li>  Choose the OK button to view the next task. VISUAL BASIC TOOLS </li></ol>

This section describes the Visual Basic tools provided with Microsoft Project version 4.1.


 * Batch Printing
 * PERT Analysis
 * Project Analyzer
 * Timesheets

Batch Printing
Using Batch Printing (BATCH.EXE), a Visual Basic version 3.0 application, a user can create print “batches” in Microsoft Project version 4.1. Each batch consists of a number of either views or reports that the user wants to print. Once a batch has been created, the user can print every item contained in the batch for either all open projects or just the active project.

To use Batch Printing:


 * 1) From the Tools menu, choose Macros.
 * 2) From the Macro Name list, select BatchPrinting.
 * 3) Choose the OK button.

Batch Printing dialog box: This is the main dialog box used in batch printing and is loaded when the program is launched. The form lists the batches currently saved. Users can create new batches, and copy, delete, or edit existing batches.

Batch Printing Dialog Box Controls

Print Batches Displays a list of the batches currently saved. Print Executes printing of the currently selected batch. Close Closes the application dialog box. New Invokes the Batch Definition dialog box to create a new batch. Copy Invokes the Batch Definition dialog box to create a new batch with the same contents as the selected batch. Edit Invokes the Batch Definition form for editing the selected batch. Open Opens a file containing a set of batches. Save Saves a set of batches to a file. Print For When Print is selected, this option determines whether the batch items will be printed for all open projects, or only the active project.

Batch Definition dialog box. In the Batch Definition dialog box, users specify which views and reports will be contained in the batch.

Batch Definition Dialog Box Controls

Batch Name Name of the batch. Batch Contents List of items contained in the batch. Name Name of batch item (report or view). Item Fills Name list with appropriate list of views or reports. Table List of project tables. Filter List of project filters. Add Adds selected item to batch. Remove Removes selected item from batch. Remove All Removes all items from batch. OK Creates the batch and closes the dialog box. Cancel Closes the dialog box without creating the batch.

The list of batch items is displayed in an outline to better illustrate the relationship between table, filter, and view. Double- clicking an item will expand or collapse the outline, if applicable.

Select (default) to print the selected view with its current settings, instead of setting a particular table or filter before printing.

If a user selects an invalid table or filter for a particular view, the invalid table or filter will not be applied but the view will still be printed with the currently applied table or filter.

If a user selects a view that is unprintable (task forms, resource forms, and the Task PERT Chart), the invalid view is added to a batch, but the view will not be printed. No alert will be generated in this case.

PERT Analysis
Many project managers are familiar with the PERT or network chart used to represent tasks and relationships in a project; it is also a scheduling method. PERT was developed to estimate task durations by combining three estimates–best, worst, and expected task durations– using a weighted average to get a single estimate for the task known as the PERT duration. The PERT Analysis macro and its associated views, tables, forms, and toolbar are stored in PERT.MPP in the LIBRARY subdirectory of your Microsoft Project 4.1 directory.

To install PERT Analysis:


 * 1) Open the PERT.MPP file.
 * 2) From the Tools menu, choose Macros.
 * 3) From the Macro Name list, select Install_PERT_Analysis.
 * 4) Choose the OK button.

NOTE: To remove the PERT Analysis macro from your GLOBAL.MPT file, open PERT.MPP and run the Uninstall_PERT_Analysis macro in the Macro Name list.

To use PERT Analysis:


 * 1) Open or create any projects on which you want to perform the PERT analysis.
 * 2) Click the Analysis Sheet button on the PA_PERT_Analysis toolbar. This will set a task sheet view that allows you to enter best, worst, and expected duration estimates for each task in your project.
 * 3) Click the Calculate PERT button to calculate the PERT durations. The calculated durations will be entered into the tasks’ duration fields.

TIPS


 * You can also enter duration estimates using the custom PA_PERT Entry Form. Select the tasks that have the same duration estimates, and then click the Entry Form button on the PA_PERT_Analysis toolbar. The values you type in the form will be entered for all selected tasks.
 * If you know the duration for some of your tasks and don’t need to use the PERT method to estimate their duration, enter the same duration for each of the three estimates.
 * You may want to alter the weights that are applied to each of the best, expected, and worst duration estimates before beginning the PERT analysis calculation. The default values are 1, 4, 1 respectively. Click the PERT Weights button on the PA_PERT_Analysis toolbar to bring up the custom form to alert the weight values.
 * If you want to see schedules based on each of the best, worst, and expected durations, click the Optimistic Gantt, Expected Gantt or Pessimistic Gantt toolbar buttons. The start and finish dates for each set of task bars are placed in the Start1/Finish1, Start2/Finish2, and Start3/Finish3 fields in Microsoft Project. If you later change a value in a Best, Worst, or Expected field, choose the “Calculate PERT” to recalculate these schedules.

Project Analyzer
In any open project, the Project Analyzer finds the task most behind schedule, the resource most over budget, and the resource most overworked. It can also show all slipped tasks, and over budget and over-allocated resources.

The source code for the Visual Basic program is stored in the subdirectory of your Microsoft Project 4.1 directory.

To use Project Analyzer:


 * 1) Open Microsoft Project and a project on which you want to run Project Analyzer.
 * 2) From the Tools menu, choose Macros.
 * 3) From the Macro Name list, select ProjectAnalyzer.
 * 4) In the About The Project Analyzer dialog box, choose the OK button.
 * 5) Select any open projects that you want to analyze.

TIPS


 * You can choose the More button to get more information about a particular category. Then you can select any of the listed resources or tasks and choose the Go To button to select the appropriate task or resource in the open project.
 * You can choose the Select button if you have more than one project open and wish to analyze a different project.
 * You can create a baseline schedule in Microsoft Project to look at the variance between the project’s current schedule and the saved baseline schedule to find out which tasks are slipping and which resources are over-allocated and over cost. From the Tools menu, choose Tracking, and then choose Save Baseline.

Timesheets
Timesheets is a Visual Basic version 3.0 application that allows the user to update resource work at the task assignment level. For each resource having one or more task assignments, the macro displays a grid of task assignments, along with the current, scheduled, and actual work values for each assignment.

To use Timesheets:


 * 1) Open Microsoft Project and a project containing both task and resource assignment information on which you want to run Timesheets.
 * 2) Click the secondary mouse button on any toolbar and select Tracking from the shortcut menu.
 * 3) Click the Update Resources button on the Tracking toolbar. After the macro loads the necessary information from Microsoft Project, the Options form is displayed.
 * 4) Choose either to update all resources in the project, or only choose one resource from the list.
 * 5) You are prompted to enter From and To dates to define the “update period.” If you enter dates, they are used as a task filter to select the tasks that will be displayed. Any task scheduled to be in progress at any point in the date range defined by From and To will be selected. If you enter a date that is earlier than the project start date, that date is replaced with the project start date. If you enter a valid date but don’t enter a time, then the default start time is added to whatever date you enter. If you enter a date that is not in a recognizable format, an error occurs. If you enter a date that is after the finish of the project, your date is replaced with the project finish date. If you enter a valid date but don’t enter a time, then the default start time is added to whatever date you enter. If you enter a date that is not in a recognizable format, an error occurs.
 * 6) Choose the OK button.
 * 7) The macro displays task assignment fields on the Update Resource Work form.
 * 8) Update the fields you want to update. The Tracking macro will fill in the corresponding new information for the fields you update.

Update Resource Work Form
For each resource with task assignments, the Update Resource Work (URW) form displays the following information:

Project Name. The project name (not including the path) is displayed in the caption of the URW form.

Resource Name. This is a uneditable field that displays the full name of the current resource.

Date Range. Displays the date range (including time of day) that is being used by Timesheets to filter task assignments.

Update As Of. This date is the “as of” date that is used as the basis for all remaining work calculations. Any time that remaining work is entered, it is added to the task using the Resume No Earlier Than (RNET) field. First, the As Of date is entered into the RNET. Note there is only one RNET for a task; this is NOT an assignment-level field. After we enter a date for RNET, we add the remaining work for the resource at the assignment level. In effect, this causes remaining work to be scheduled (or “updated”) “as of” the RNET.

Altering the RNET, then changing remaining work at the assignment level might have several effects on the task. The most likely effect is a change in the finish date of the task. The finish might become earlier or later, depending on the RNET and the number of hours of remaining work, as well as which resource is currently “driving” the task. The As Of date defaults to Today’s date + the default finish time for the project.

The macro displays eight fields for each task assignment. You can edit four of the eight fields. The other four fields display current information about the task. The macro may take many actions, depending on the contents of each of the fields. All of the fields are interrelated so that altering one field may have an unexpected effect unless the contents of the other fields are considered. The following is a list of the fields, and the major actions that will be taken by Timesheets for certain field entries:

Task ID. This is the ID of the task to which the resource is assigned. You cannot edit this field.

Task Name. The name of the task. You cannot edit this field.

Actual Work. The number of hours of actual work performed to date by the resource on the given task. You cannot edit this field.

Remaining Work. The number of hours of work remaining on this assignment. The remaining work is calculated by Microsoft Project and is equal to scheduled work minus actual work. You cannot edit this field.

Hours Worked. This is the number of hours of work performed by the resource during the update period. The update period is any arbitrary time period during which work is performed. For example, an update period might be according to work week. If the resource performed 20 hours of work during the period, then you enter 20 into this field. When you enter a value into the Additional Work field, the Timesheet performs the following actions:


 * 1) The hours worked are added to the current actual work value to obtain the new actual work value that will be entered into the project.
 * 2) The hours worked are subtracted from the current remaining work value to obtain the new remaining work.

New Remaining Work. This is the estimated number of hours of work that must be performed before the resource will have completed all its work on the task. When the task assignment is initially displayed, New Remaining Work (NRW) is taken from the assignment’s remaining work field.

Depending on the value entered into the NRW field, Timesheets performs the following actions:


 * 1) If NRW is 0 (zero), then Timesheets assumes that the resource has finished its portion of work on the task. If no task finish date is entered, Timesheets calculates the finish date based on the work accomplished and a normal working schedule. You can only edit the finish date if NRW is zero.
 * 2) If NRW is > 0, then Timesheets will enter the NRW in the remaining work field for the task assignment. Depending on the previous value of remaining work, this might result in a change in task duration and/or driving resource.
 * 3) A negative (NRW < 0 ) entry is not allowed.

Start Date. This is the date when the resource actually started work on the task. This date may be earlier or later than the original scheduled date. This field may be edited only if Actual Work = 0 (and therefore, Remaining Work > 0 ). Once actual work has been entered for a task, the Start field cannot be edited. The action taken by Timesheets depends on the value entered in Start.

<ol style="list-style-type: decimal;">  If the date entered is earlier than the original scheduled start date, the macro will do the following: <ol style="list-style-type: lower-alpha;">  If there are no other resources assigned to the task, the macro simply changes the start date of the task to the date specified in the Start field. </li>  If there are other resources assigned, the macro will alter the delay field of the resources to maintain their current start dates. </li></ol> </li> <li> If the date entered is later than the original scheduled start date, the macro will do the following: <ol style="list-style-type: lower-alpha;"> <li> If there are no other resources assigned, the start date of the task will be changed to the date entered in the Start field. </li> <li> If there are other resources assigned, the macro will add (or remove) delay to maintain the current start dates. </li> <li> If all of the resources already have delay, the macro will adjust the task start date to the earliest resource start date, then adjust the delay values of all the other resources to maintain their current start dates. </li></ol> </li> <li> If the date entered is the same as the original scheduled start date, then the macro simply enters the actual work without altering any of the dates or delay fields. </li></ol>

Finish Date. This is the date that the resource finished all its work on the task. This field can only be edited if NRW = 0 (i.e., no remaining work). You do not have to enter anything in the Finish field. If you do not enter a date, then the macro defaults to the date calculated by Microsoft Project based on the resource start, number of hours worked, and units assigned.

If the user did enter a finish date, then the macro will adjust the resource units and/or overtime work as necessary to maintain the schedule that you entered.

An example of how the macro adjusts work as necessary to maintain the schedule

The following examples show how this theoretically works. The examples assume the following scheduled dates and work for the example task:

Task start date: 12/13/93 Task work: 16 hours Task finish date: 12/15/93

Example1: The user enters a finish date that is after the scheduled finish: If the user enters a finish date of 12/17/93, and work remains 16 hours, then the macro will adjust the resource units so that Microsoft Project will show that the resource started and stopped on the dates entered by the user. In this case, units would become .5.

Example2: The user enters a finish date that is before the scheduled finish date: If the user enters a finish date of 12/14/93, and work remains 16h, then the macro will enter the excess work into Overtime work.

Overtime work is calculated as follows:


 * 1) The Start date and the Finish date are compared to determine the maximum available working duration between the two dates according to the resource’s calendar.
 * 2) The total amount of actual work is entered into the actual work field.
 * 3) The max. avail. work obtained in step 1 is subtracted from the total actual work.
 * 4) If the value obtained in step 3 is not greater than the value from step 1, then the value from step 3 is placed into overtime work.
 * 5) If the value obtained in step 3 IS greater than the value from step 1, the excess work over and above the value from step 1 is discarded, and the remainder is placed into overtime work. This is because Microsoft Project places the restriction on overtime work, that it must not exceed work for the same period. This will have the effect of overriding the finish date entered by the user.

An example based on the dates for the example task
The user enters a start date of 12/13/93 8:00 am. Then the user enters 20 hours of work, and a finish date of 12/13/93 5:00 pm. The maximum amount of work that can be performed in this period (according to step 1) is 8 hrs. Yet the user has entered 20 hours of work. Then the user subtracts max. avail. work (8 hours) from total work (20 hours) to obtain the excess (12 hours) work. Next, the user subtracts the max. avail. work from the excess, which gives you the “unreality factor”: 4 hours. The macro does the following:


 * Places 20 hours in Actual Work.
 * Places 8 hours in Overtime Work.
 * Allows Microsoft Project to calculate the new finish based on duration, which will now be 12 hours. The new finish date will actually be 12/14/93 12:00pm. This is 4 hours later than what the user entered. Since the unreality factor was 4 hours; the extra work is necessarily converted to duration, lengthening the task beyond the finish date specified by the user.

= Additional query words: 4.00 4.10 4.1a 1.00 multi-user =

Keywords : kbother Version : 4.00 4.10 4.1a Platform : WINDOWS Hardware : x86 Issue type : kbreadme ============================================================================= Copyright Microsoft Corporation 1997.