View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dick Kusleika[_3_] Dick Kusleika[_3_] is offline
external usenet poster
 
Posts: 599
Default Printing Slow Down On VB Repetitive Use

R

Post the code.

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com

"RSnyder" wrote in message
...
I have a VB instruction set (macro) that hides unnecessary lines on a

worksheet before printing out the worksheet and it works fine except for
when I repeat the macro each time after that. It's not that the macro
instructions aren't carried out it's that the time it takes to execute slows
down dramatically after the 1st execution of the macro. Typically, the code
executes and does the print the 1st time in roughly 3-4 seconds. Its
roughly 270 lines for the IF statements to determine the hide status on a
line and to do the hide or proceed to the next line. All executions after
the initial execution the time jumps up dramatically to 15 seconds. The
speed on each successive execution looks to be about the same. Now that's
not a big deal either however me being a speed demon I'm searching for speed
and not "that's acceptable".

Help me out here. Is this a possible variable issue not being released

after the 1st execution is done even though I'm completely out of the macro
or is it something else maybe in the operating environment? If I closed out
of the workbook and came back in each time I get the same result when
running the macro.