Fill "Resource Usage" View using VBA

D

DeeJay1981

Hi,
I'm trying to fill the "Resource Usage" View with some data imported from
Excel or Clipboad.
To figure out how this works I recorded some macros and tried to understand
the vba code generated.

I understand what codelines like the following mean:

ActiveProject.Resources.UniqueID(1).Assignments.UniqueID(2097156).TimeScaleData(StartDate:="18.12.07 00:00", EndDate:="19.12.07
00:00", Type:=8, TimeScaleUnit:=4, Count:=1).Item(1).Value = "8"

But I have no idea how the "Assignments.UniqueID(2097156)" ist generated.
What ist the logic behind this 7-digit number? First I was thinking about a
time- or date-code..
Or is there any other possibility to fill this form, without knowing this
UniqueID 7-digit number?

THX in advance
cu Markus
 
J

JulieS

Hello Markus,

I am certainly *not* a VBA guru, but my understanding of the
assignment unique ID is that Project generates the unique ID not only
for resources and tasks but also assignments. I'm not sure there is
any "logic" that is discernable to us mere mortals.

For detailed information on how to create assignments in VBA, I
suggest reposting your question to the Project Developer newsgroup.
Although many of the responders visit all newsgroups, you're most
likely to catch the eye of one of the VBA gurus in the developers
group.

I hope this helps. Let us know how you get along.

Julie
Project MVP

Visit http://project.mvps.org/ for the FAQs and additional information
about Microsoft Project
 

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