"Greg" <(E-Mail Removed)> wrote in message
news:a604fbb5-857f-49ae-be5a-(E-Mail Removed)...
> All,
>
> I was recently asked to add a 'team calendar' sheet that would
> consolidate all employees' time off onto one page so the manager could
> see if there were vacation conflicts.
>
> (VBA-approach) I first tried to accomplish this by having a For/Next
> loop circle through all appropriate cells per employee sheet and
> export to the Team Calendar tab. This, unfortunately, took a lot of
> time to do and was not very efficient. For reference, 5 employees
> could take up to 15-20 seconds.
>
My guess is the poor speed has a lot to do with not shutting off the
user interface while running your code.
Don't use .Select or .Activate at all in your code, until you are
exiting and want to set up what the user is going to see. There are
different ways to achieve this result; what I use depends some on how I
feel when I'm coding that day (okay, that's a bit of a joke) and on
exactly what I need to do. With / End With comes in handy; I also use
"Set myRange1 = (some range)" and "Set myRange2 = (some other range)"
and then operate on those variables.
Also, check out the performance tips at
http://blogs.msdn.com/b/excel/archiv...practices.aspx
HTH!
--
Clif McIrvin
(clare reads his mail with moe, nomail feeds the bit bucket :-)