View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default copy cells with a macro...

John,

Any large workbook with lots of calc or other events will almost always
benefit by turning off auto-calc, screen updating, and events:

With Application
.ScreenUpdating = False
.EnableEvents = False
.Calculation = xlCalculationManual
End With

Other code here

With Application
.ScreenUpdating = True
.EnableEvents = True
.Calculation = xlCalculationAutomatic
End With

HTH,
Bernie
MS Excel MVP

"John Keith" wrote in message
...
That line of code worked for me, I always like seeing different ways to

code
things (one of these days I'll start to grasp more of this VB-syntax)

The run-time didnt change much though, the loop it replaced was only
itterating once of twice (since im still testing the logging feature) I

bet
it would have made a huge difference if i was in the 1000s of rows logged
though.

Once thing I noticed, when I click one of the buttons, the "calculating
cells" message appears at the bottom left of the screen, I dont see the
percentage count upwards... it blinks at 0% then immediately goes to 100%,
which remains while the macro is completing. It takes about 4-5 seconds

for
the process to finish.