Just in case there is a cure for "jumping rows"...

T

Turquoise_dax

I finished programming my buttons to toggle between summary / complete
views, which works fine.

Dim cell As Range
For Each cell In Range("B:B")
If cell = "i" Then Rows(cell.Row).Hidden = True (False for
complete view)
Next

There is just this small problem, which I know is normal, but I wonder
if I can do something about it: when the file is big, and there is lets
say more than a 100 rows, the screen goes jumping for a few seconds
while the macro is being executed. I know it can be explained by the
fact the program is a cycle, but is there anything I can do so that the
screen doesn't jump?
 
G

Gord Dibben

Add a couple of lines to your code

Dim cell as Range
Application.ScreenUpdating = False

rest of your code here

Application.ScreenUpdating = True


Gord Dibben MS Excel MVP
 
G

Guest

Start your code with Application.ScreenUpdating=False, end with
Application.ScreenUpdating=True
 
T

Turquoise_dax

Thanx, really works wonders... (I might be relatively ungifted for
programming, but I should have though about this one!)

Thanx!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top