View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
[email protected] idyllicabyss@googlemail.com is offline
external usenet poster
 
Posts: 32
Default Very Slow Macro Problem

Dean,

Try turning off the automatic calculation with
Application.Calculation = xlCalculationManual
but remember to turn it on again!
Application.Calculation = xlCalculationAutomatic

Also, try to optimise your code;
LR = Range("B65536").End(xlUp).Row ' Determine the last used row
For each cell in range("B1:B" & cstr(LR))
if cell.value = 0 then
rows(cell.row).entirerow.hidden = true
endif
next cell
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
cells.entirerow.hidden = false