PDA

View Full Version : Solved: Stop the cursor in a loop



rbunc
12-22-2006, 02:57 AM
Can anyone help me with this one?
I am doing a search through an excel file with a For...Next loop.
Code executes fine, but I don't want to see the cursor going through every cell on the worksheet. I know there's something I can use to turn this off and then back on at the end of the sub, but I can't remember what it is.

Any help? Thanks!

Andy Pope
12-22-2006, 03:10 AM
Hi,

This will stop screen flashing.

application.ScreenUpdating =False
'
' your code
'
application.ScreenUpdating = True

Removing any .Select type statments will also stop the cursor moving, although you will probably need to revise other parts of your code to function if you use Activecell.

rbunc
12-22-2006, 03:30 AM
Thanks Andy! That seemed to work well.
Merry Xmas!:thumb

Zack Barresse
12-22-2006, 10:09 AM
You can mark your thread as Solved by going to Thread Tools | Mark Thread Solved | Perform Action.