how to change the working time for a task in vb.net 2005??

J

Johnathan

hi, could someone tells me how to change the working time for a task
programatically using vb.net?? Also how does overtime rate affect the cost of
a resource and a task?
 
J

Jan De Messemaeker

Hi,

I don't know any VB.Net but I suppose showing the appropriate methods and
propeties in VBA will helps as well?
For the first question, use the Task.Calendar method
Ex. Activeproject.tasks(34).Calendar="Productioin Cal"

Overtime work is multiplied by the Overtime Rate instea of the standard
rate.
Overtime Work is NOT automatically calculated from the calendar vs. Work
HTH
--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
+32 495 300 620
For availability check:
http://users.online.be/prom-ade/Calendar.pdf
 
J

Johnathan

by doin this:
Activeproject.tasks(34).Calendar="Productioin Cal"

only change the calender type. It doesn't change the working time
programmatically. The default starting time is 8:00AM and finish time is
5:00PM. I tried to change the finish time to 7:00PM in MS Project but it
appears that the finish time remains 5:00PM. To summarize what I'm trying to
do, I would like to change the man-day of a task, any opinion on how can I
achieve that??
 
J

Jan De Messemaeker

In Project, Working time is the definition of when (in terms of which
minutes duiring a day) the task can be executed.
How many houurs a DAY is is defined in Tools, Options, Schedule but it is a
setting for all tasks.
If you want the task to be scheduled accorrding to its own working time use
my solution.

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

Johnathan

your solution only set the calender type but doesn change the working time
for the task isn't it? let say I change the working time from 8:00am - 5:00pm
to 8:00am - 7:00pm, the extra 2 hourse do I consider as overtime work?
basically changing the man-day for a task is impossible or not advisable?
 
J

Jan De Messemaeker

Hi,

Setting a calendar on a task DOES change the working time for that task into
the working time in that calendar, and the task will now be scheduled
according to tha task calendar. I don't know why you keep denying that, a
simple test would have shown you.

OTOH, Project does NOT, never ever, CALCULATE overtime work. I already
explained that in my first post in this thread. Whatever the calendar or
other settings, it is up to you to tell Project which part opf the recorded
work is overtime work.

Does that clarify the issue?

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

Johnathan

what I dun get is when I do this:

Dim prj As Microsoft.Office.Interop.MSProject.Project
prj = prjapp.ActiveProject
prjapp = GetObject(, "MSProject.Application")
prj.Tasks(1).Calender = "Standard"

it assign the task to standard calender.I don't understand how would that
changes the working time.
 
J

Jan De Messemaeker

It simply does.
The task is now scheduled using the working time of the task calendar.
Even if you don't understand that, it simply does, I'm sorry.
And you better define prjapp before using it in a statement.

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
 

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