Quantcast
Channel: Project Customization and Programming forum
Viewing all articles
Browse latest Browse all 5347

Where does "Project.ActualWork" come from? And why doesn't "Project.Work" give the expected answer?

$
0
0

Hi folks,

I haven't done much with Project in VBA, but I've been using VBA for a very long time in the other Office apps (even back to the WordBasic days).  I don't recall running into this situation before (or maybe I just forgot). In Project Pro 2010,  if I start typing something like  "n = oProject.a", where oProject was previously defined with "Dim oProject as Project" ", I get the completion pop-up list of members for the Project object.  There is no "ActualWork" or "Work" member in the popup.  Neither do these members appear in the main application Project item in the Object Browser.

However, when I debug a VBA routine where oProject is set to ActiveProject and look at the local window for oProject while paused, there are both ActualWork and Work members in the oProject list.  I also find I can debug.print both members.  However, while oProject.ActualWork gives the same answer as oProject's ProjectSummaryTask's object's "ActualWork" member, oProject.Work returns (for the project in question) "True" instead of what the ProjectSummaryTask's "Work" member returns.

Aside - Even though ActualWork doesn't appear in the member pop-up list for a Project object while typing in VBE, if I type "oProject.actualwork", VBE will still capitalize ActualWork when I complete the line.  Huh?

So, where are Project.ActualWork and Project.Work coming from, what do they mean, and why doesn't Project.Work return a value similar in type to what Project.ActualWork is returning?  Is this some kind of runtime internal inheritance thing between the Project and Task classes?

Thanks!


Viewing all articles
Browse latest Browse all 5347

Trending Articles