Assignment in Task Usage

L

Lapshin Poul

Hi. I need to get Assignment ID when selecting a cell with Resource Name in
TaskUsage view. I tried to use "Application.ActiveCell.Task" construction,
but couldn't get any result.

Any help will be welcomed.
Best regards
 
J

Jan De Messemaeker

Hi,

There may be shorter ways but this should do it:

for each As in activeselection.tasks(1).assignments
if as.resourcename=activecell.text then
debug.print As.uniqueid
exit for
end if
next As

Hope this helps,
--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
+32 495 300 620
For availability check:
http://users.online.be/prom-ade/Calendar.pdf
 
L

Lapshin Poul

Thanks Jan.
It is a good way, but it doesn't work with other cells in a row.
I want to get assignment ID when clicking any cell in assignment row.
Maybe you know any other way.
 
L

Lapshin Poul

Jan. Thank you for your helps in my first question. Maybe you can help me in
my second question?
 
J

Jan De Messemaeker

Hi,

The hard truth is I can't find a solution.
AFAIK no propery of either activeselection nor Activecell in this
circumstances allows to identify the resource nor the assignment.
Sorry.

--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
+32 495 300 620
For availability check:
http://users.online.be/prom-ade/Calendar.pdf
 

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