Home > Software design >  Set Duration Units to hours in VBA when generating a new MS Project
Set Duration Units to hours in VBA when generating a new MS Project

Time:08-08

The default Duration Unit for MS Project is Days, but most of our Projects require the duration units to be displayed in hours. I use VBA to generate new Projects; does anyone know how to set MS Project Duration Units to hours in VBA?

CodePudding user response:

The Project object has a property called DefaultDurationUnits; set it to pjHour.

For example:

ActiveProject.DefaultDurationUnits = pjHour
  • Related