E
Ebbe
Hi
In a macro I run through the tasks to make some changes in the
GanttBarFormat's.
In some cases the macro faults because of an empty task (Object is not set).
F. ex. Task 6 is blank (no data in it)
When I debug the code, the watch window shows the value of the
"ActiveProject/Tasks/Item 6" to be Nothing.
I have tried: "If ActiveProject.Tasks(6) = Nothing Then". This results in a
compiler error.
I have tried: "If IsEmpty(ActiveProject.Tasks(6)) Then". But the "IsEmpty"
returns false.
I have tried: "If IsNull(ActiveProject.Tasks(6)) Then". But the "IsNull"
returns false.
How can I walk through all the tasks in the project and "jump over" the
empty tasks?
Ebbe
In a macro I run through the tasks to make some changes in the
GanttBarFormat's.
In some cases the macro faults because of an empty task (Object is not set).
F. ex. Task 6 is blank (no data in it)
When I debug the code, the watch window shows the value of the
"ActiveProject/Tasks/Item 6" to be Nothing.
I have tried: "If ActiveProject.Tasks(6) = Nothing Then". This results in a
compiler error.
I have tried: "If IsEmpty(ActiveProject.Tasks(6)) Then". But the "IsEmpty"
returns false.
I have tried: "If IsNull(ActiveProject.Tasks(6)) Then". But the "IsNull"
returns false.
How can I walk through all the tasks in the project and "jump over" the
empty tasks?
Ebbe