PDA

View Full Version : Application.Date Formulas - How to load Task Calendars?



Stephen5929
09-15-2015, 05:57 PM
Hello Everyone,

I'm working on an assignment for work and I am running into some difficulty when trying to load Task Calendar objects into the Application.date formulas in the VBE (e.g. application.dateadd, application.datesubtract etc.). These functions require three inputs:


Date
duration to add or subtract
Calendar (either Project, Task or Resource)


Number 3 is where I am running into difficulty. I can get the formula to work by loading "ActiveProject.calendar" as input # 3. However, this loads the default (usually Standard) calendar. My project has multiple Task Calendars and I need to know how to load the Task Calendar Objects. When I try to load a specific calendar (e.g. "ActiveProject.Tasks(#).calendar") it generates an error. Does anyone know how to load the individual Task Calendars? Any assistance anyone can provide would be much appreciated!

Thank you,

Steve