View Single Post
  #8   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Sat, 22 Jan 2005 15:44:33 -0600, Myrna Larson
wrote:

I'm always "fussing" about the speed of VBA code since it's almost always
slower than built-in functions.

I wonder if a couple of changes in the code would speed it up.

The first (probably most important) is to read the holiday list into an array
and search that rather than accessing the worksheet multiple times. Reading
from or writing to a worksheet always creates a big bottleneck. The other is
to eliminate multiple calls to Weekday.


All good suggestions. And substantial speedup based on your timing results.

Ordinarily, my preference is to use arrays. But I was a bit tired last night.
I'm going to try something a bit different and I'll post back.


--ron