ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Disabling an AutoRefresh of Scrolling in VBA (https://www.excelbanter.com/excel-programming/300782-disabling-autorefresh-scrolling-vba.html)

Devin[_4_]

Disabling an AutoRefresh of Scrolling in VBA
 
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

Kris

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
.



All times are GMT +1. The time now is 02:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com