T
tpiers
I have two projects. When I run the following from one project I get the
expected results. When I activate the other project and run it, I get the
error message 'Object variable or With block variable not set. I cannot
figure it out.
Sub Test()
For Each T In ActiveProject.Tasks
Debug.Print T.Name
Next T
End Sub
I do not know if it makes a difference, but the project where the code works
was never published on PWA. The other project was published, but then saved
locally. I am running the VBA against both projects stored locally.
I am using Project Professional 2002.
Any hints would be appreciated.
Thanks, Tom
expected results. When I activate the other project and run it, I get the
error message 'Object variable or With block variable not set. I cannot
figure it out.
Sub Test()
For Each T In ActiveProject.Tasks
Debug.Print T.Name
Next T
End Sub
I do not know if it makes a difference, but the project where the code works
was never published on PWA. The other project was published, but then saved
locally. I am running the VBA against both projects stored locally.
I am using Project Professional 2002.
Any hints would be appreciated.
Thanks, Tom