View Full Version : Lots of VBA - timescaling/zoning the Network Diagram, risk analysis, other stuff.

11-27-2008, 08:24 PM
I have some Project VBA macros for downloading at my Web site, which I cannot reference here because my post count must be 5 or greater, which hopefully it will be soon. I can be be reached by email at yahoo, under the name onetruerick2008, and from there I can point you to my page, which is VBA followed by the usual extension for an HTML file (leave off the L). The name of the site is the word Electron followed by the word Automotive with no space in between, and it is a COMmercial site.

One of them is a timescaling/zoning macro (and from) for the Network Diagram view. Another is a logic tracing macro, and a third one compares two MS Project files and writes a report to Excel, highlighting the differences between the two files in red.

I have a lot of others, too, not on the page, but I can post them or email them to anyone who would like to try them. I have a logic report, macros that interact with Outlook (create Outlook tasks from Project tasks, create task start and finish reminders in Outlook calendar, etc.) and a lot of random ones. If you need some, just ask, I probably have it somewhere.

I have used Project since it was first introduced, even MacProject, and have been doing scheduling for over 25 years now. I also have a lot of experience doing schedule risk analysis (I do it for NASA now), and have my own Monte Carlo simulation tool, SCRAM2009. From my VBA page you can go to a YouTube demo of this program.

If you try any of the macros, please drop me a line with your questions or suggestions on improvements.

Rick W

12-07-2008, 06:41 PM
See the attachment. It contains a form and a text file. The text file contains a macro that launches the form. The form's code allows you make the Project Network Diagram View really useful. You select a date field for timescaling, and a Text or WBS field for zoning. One excellent way to "zone" your network is to use a text field, and build the contents of that field. For example, sort by Total Slack and show that column. Copy all the values to a column in Excel. On the lines that show your major milestones, put a number in those cells that are less than the smallest Total Slack in your schedule - if your smallest TS is 0, put a -10 in the cells for the major milestones. Then paste this column into Text1 or another Text field in Project. Run This macro, and in the form, select the field you put the codes into and select a timescale field like Start or Finish, and run it. You will end up with your major milestones at the top, the critical path next, the second most-critical path next, and so on.

Another good arrangement is if you use the Contact field - copy those to a text field, and put a 1 in that text field for major milestones. This gives you your milestones at the top and then a zone for each contact in the schedule.

If you use a risk analysis package - you can put the most critical path at the top, the second-most critical one next, and so on.

You can use the box height, box width, zone spacing and page width values to "tweak' the output. For example, putting a smaller value into Page Width will make your Network Diagram shorter horizontally.

Send meyour comments and suggestions for improvements.

07-24-2011, 05:10 AM

It looks as if you might be able to help me based upon your experience.
We have a VBA macro that is selecting and extracting data and building a MS Project 2010 Pro project plan. When the plan is built, I want to write protect a particular field. Specifically it is a duration field. I'm not sure what the VBA code would be to accomplish this.
your help would be greatly appreciated.


03-31-2012, 07:32 AM
Thank you