Re: Nonworking hours

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



In article <52310D68-859C-4CE2-BC2A-E93FB8A6858F@xxxxxxxxxxxxx>,
Dan <Dan@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

Yes, it's running slower than I would wish. I have 15-20 projects sharing a
resource pool, and so to check for 450 days for each one whether each day is
working or not, takes a lot of time, when each project only has 10-15
nonworking days among those 450 that I'm checking.

Dan

Dan,
OK, but how often do you have to check it? Normally calendars don't
change, so once you have a count (or whatever data you want) for the
non-working days, you're done, right? I mean, it's not like you are
going to run a -90 to +360 count every day, week or month. The most you
should have to run it is maybe once a year.

John
Project MVP

"John" wrote:

In article <481E4AC9-9CE5-48C1-A84A-9E0BDCAE00CE@xxxxxxxxxxxxx>,
Dan <Dan@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

John,

Thank you for your response.

Right now I'm using a range of dates that starts 90 days before today and
ends 360 days after today, using a For loop to test each and every one of
those dates. I may have holidays defined that are outside the range of
the
start and end dates of the project, so I can't simply loop on the start
and
end of the project. Do you have any other suggestions that might make my
checking more efficient or fewer loops?

Dan

Dan,
As far as I know, the code must look at each day to determine if it is
working. Is your code not running fast enough or what is the real
problem?

John
Project MVP

"John" wrote:

In article <E1A73539-B5C9-46A6-8A2C-5EE4F9DF64D0@xxxxxxxxxxxxx>,
Dan <Dan@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

I am writing a VB program that accesses the data in my project files.
I
know
how to find out how many tasks are defined in a project and how to
access
the
data for each task. I can do the same thing for resources and
assignments. Is
there a way to find out how many dates are defined as nonworking and
get
the
data for those dates? Right now, I only know how to loop on a set of
dates
and check .Days(I).Working. Is there a simpler way to get a
collection of
only the dates for which .Days(I).Working is False?

Dan

Dan,
Probably not but I guess it depends on the construct of your code.
Maybe
it is not set up as efficiently as it could be.

John
Project MVP


.



Relevant Pages

  • Re: Nonworking hours
    ... it's running slower than I would wish. ... resource pool, and so to check for 450 days for each one whether each day is ... start and end dates of the project, so I can't simply loop on the start and ... Project MVP ...
    (microsoft.public.project)
  • Re: Nonworking hours
    ... Dan wrote: ... start and end dates of the project, so I can't simply loop on the start and ... Project MVP ... assignments. ...
    (microsoft.public.project)
  • Re: Nonworking hours
    ... Dan wrote: ... there a way to find out how many dates are defined as nonworking and get the ... I only know how to loop on a set of dates ... Project MVP ...
    (microsoft.public.project)
  • Re: enhance m-files performance by compiling?
    ... as Dan already pointed out: ... Although MATLAB was invented ... of programming skills. ... about 100 lines, and one loop. ...
    (comp.soft-sys.matlab)
  • Re: Whats wrong with this code?? A97 XP SP2
    ... Thanks Dan - that makes sense, seems like there should be an easier way to ... and this is the first run for the routine. ... >> routine should use Like (for wildcards) ... >> Just working on the first part of the If - Loop for now. ...
    (microsoft.public.access.modulesdaovba)