David M
David M

Reputation: 197

How to set Project Priority using VBA

I'm writing a macro (in VBA) for Project 2010 and one of the things I'd like to accomplish is setting the Project Priority.

I've looked around MSDN but can't seem to find any information regarding this - no property, method or object that allows me to do this. Am I overlooking something, or is there really no way to edit the Project Priority?

Upvotes: 0

Views: 899

Answers (1)

Kevin Pope
Kevin Pope

Reputation: 2982

The Project priority field for some reason doesn't show in the Object Browser or in the Intellisense, but if you look through a Project object while debugging, you'll see it, and you can set it with this code:

Dim proj As Project
Set proj = Application.ActiveProject
proj.Priority = 100

Tested in Project 2010 64-bit, and the updated priority appears in the Project -> Project Information -> Priority field in the UI.

Upvotes: 1

Related Questions