How can I get TimePhased "StartTime" programmatically

L

LCO

Does anyone know how to programmatically return the start
time for a particular task at any interval of the project
timeline when "Actual Work" is entered?
 
J

Jan De Messemaeker

Hi Jack,

Maybe it's my English but I understood "at any time interval" as entering
Actual work on a non-continuous basis, i.e. periods aof actual work amongst
periods of non-work.
Greets,
 
J

JackD

Now that I look at is more closely I think you may be right.
In that case, your response is right, start at the actual start date and
walk through the TSV looking for 0's followed by non-0's.

-Jack
 
L

LCO

Thanks IMHO! I'm still a bit new to project programming /
automation... Can you please elaborate further or perhaps
show me an example?

Much appreciated!
LCO :)
 
L

LCO

Thats correct!
for instance, if you start te MACRO recorder then go into
the right pane of the resource usage view and enter an
actual work value anywhere in the project time span, then
stop the MACRO and edit it, you'll see that the dates were
picked up..

Q) how does the macro pick up the "StartTime" dates and
can I programmatically get that information through VBA?

recorded macro output

' Macro Recorded Mon 04-09-13 by Lenford Oleman.
PaneNext
'SelectTimescaleRange Row:=6, StartTime:="Tue 04-12-
28", Width:=1, Height:=1
'ActiveProject.Resources.UniqueID
(66).Assignments.UniqueID(2097154).TimeScaleData
(StartDate:="04-12-28 00:00", EndDate:="04-12-29 00:00",
Type:=10, TimescaleUnit:=4, Count:=1).Item(1).Value = "2"
'SelectTimescaleRange Row:=7, StartTime:="Tue 04-12-
28", Width:=1, Height:=1

I really need to solve this!
Thanks LCO
 
J

JackD

If you want to read it for a specific period you set those start and end
dates.
You wouldn't get that information from VBA, you would give it and then read
the value corresponding to the time period.

Read the project VBA help for more details about timescale data.

-Jack
 
J

Jan De Messemaeker

Hi,

As Jack said, best is to read the Help on the Timescaledata method.
It is a few pages (including examples nd constants definition) so it's not a
good idea to try to summarize it here.
HTH
 

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