Why am I getting Arguement Value not Valid

J

Jon

Hi there

I can not understand why when I try to run the following code in
ProjectAssignmentNew I keep getting the compiler telling me that the
arguement is not valid. The two lines of code are as follows:

Set A = ActiveProject.Tasks(Index).Assignments(ID)
ActiveProject.Tasks(Index).Assignments.UniqueID(ID).ResourceID

I hope that someone can help me with this as to why I am getting this
message and how to fix it

Thanks in advance

Jon
 
R

Rod Gill

In the first line you are using assignment ID and in the second the unique
ID. Assignments only have a unique ID, so the first line can't work.

Pres Ctrl+G for the immediate window then paste the following line and press
enter (Note the number displayed: it's the unique ID). Task ID 1 will need
at least one assignment to work.

?ActiveProject.Tasks(1).Assignments(1).UniqueID

If your variable ID isn't correct, the line fails.
 

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