Monday, November 24, 2008

Using Visual Basic, get a selected Task

Use the ActiveSelection property to get all of the tasks that are selected.

Globals.[ProjectName].Application.ActiveSelection.Tasks will return the selected tasks.


For each t as MSProject.Task in ActiveSelection.Tasks
If not t is Nothing then
'do something
End IF
Next

No comments: