How can I see that a task is empty/not set?

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top