View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Kris Kris is offline
external usenet poster
 
Posts: 25
Default Disabling an AutoRefresh of Scrolling in VBA

Devin,

Turn off screen updating so that your code executes
behind the scenes, then turn it back on at the end of
your code. This will also make the code run faster as
well.

Like:

Sub My_sub()
Application.ScreenUpdating = False
'your code
Application.ScreenUpdating = True
End Sub

-----Original Message-----
Here is my problem:

I have a spreadsheet that has 40,000 + records in it. I
have written a macro that goes through and checks each
line to see if it matches some criteria. What happens,

is
while this is occur, the screen keeps scrolling with

each
line as it is selected, thus resulting in what looks

like
the computer is freaking out. What I need is a way to
disable the scrolling of the sheet until the program has
finished running. Also, I use multiple sheets in the
workbook, so I guess I would have to disable it for the
whoel workbook. Any ideas?

Thanks
Devin
.