How do I determine the end of rows without getting a Run-time erro

D

Doug

I have a very basic question, I'm using MS Project 2003 and I'm trying to
process resource rows in the resource sheet. After I process the last row, I
get a "Run-time error '91': Object variable or With Block variable not set".
I do not know how may resource rows there are ahead of time.

If I could determine what the last row is, I could stop processing before I
get the above error. In Excel, I can use "ActiveSheet.UsedRange.Row" to get
the last row, but I can't find anything similiar in MS Project.

Another option is to handle the error handling correctly, but I'm not sure
how to handle that.

Thanks
 
J

Jack Dahlgren MVP

Or, don't worry about resource rows and work on the resources themselves

for each resource in activeproject.resources
'do stuff
next resource

-Jack Dahlgren
 

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