Resource Calendars--Accessing working times

A

Andrew

I am writing a VBA addin where I need to access resource calendar
information. Specifically, I need to access the working time values for
every day in the resource calendar (i.e. Nov. 18 shift is 8:00am-3:00pm,
Nov. 19 shift is 11:00am-7:00pm, etc.).

I am able to access the calendar object for each resource, but I just can't
figure out how to map that down to working time values. I have tried
accessing the Calendar.WeekDays object, but that only seems to give me the
base calendar working time values for Sun, Mon, ... Sat. And I have tried
the Calendar.Years object, but each Year object is empty.

Has anybody done any work in this area? If so, your help would be
appreciated.

Thanks,
Andrew
 
G

Gérard Ducouret

Hello Andrew

You can take some inspiration from that excerpt of a VBA procedure which
read a resource calendar :

Deb = ActiveCell.Task.Start
Fin = ActiveCell.Task.Finish
If ThisProject.Resources(Ress).Calendar.Period(Deb + i, Fin).Working = False
Then

where Ress is the name of a resource.

Hope this help,

Gérard Ducouret
PragmaSoft
 

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

Similar Threads


Top