Object Not Set error for Blank Tasks

R

roadkill

I've tried both For Each...Next and Do...Loop in an effort to cycle through
all tasks in a series of projects and interrogate them for certain
conditions. However I haven't been able to figure out a way to avoid macro
termination caused by blank task (i.e. blank lines inserted into a schedule
to separate groups of tasks). I also tried the On Error statement in an
effort to skip over these blanks, but that didn't work either.

I recognize that removing the blanks would resolve the issue, but that may
be difficult to sell. Is there a way check each task yet avoid this error?

THE ERROR READS: Object variable or With block variable not set.

Thanks for the help,
Will
 
M

Mike Glen

Hi Will,

Try posting on the developer newsgroup. Please see FAQ Item: 24. Project
Newsgroups. FAQs, companion products and other useful Project information
can be seen at this web address: http://project.mvps.org/faqs.htm

Mike Glen
Project MVP
 
J

Jan De Messemaeker

Hi,

ANY for each should be followed by
If not thistask is nothing then
HTH
 

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