MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Active Range


Posted by Artem on April 09, 2001 8:57 AM

hello,

does anyone know how in Excel VBA to make a certain range active, without seeing Excel jumping to that cell? basically i need a macro that activates a certain range, performs a routine on it, and then activates the cell that was active before the macro was executed. when i use Range("Whatever").Activate i can actually see Excel jumping to the activated cells, performing a routine, and jumping back. is there a way for me not to see all those intermediate jumps?

there are no workarounds here because the subroutine i need to perform runs only on active cells. it is actually a macro/program purchased from a commercial company and i certainly can't modify its code.

THANKS!!!


Posted by Jim on April 09, 2001 9:09 AM

Add this line before the routine

Application.ScreenUpdating = False

then put this at the end

Application.ScreenUpdating = True

Posted by Artem on April 09, 2001 9:30 AM

Thanks Jim!!!

That works great!

Posted by Stephane Parent on April 09, 2001 10:15 AM

Try to add that at the beginning:

application.screenupdating=false

But add that at the end of your code

application.screenupdating=true

Moreover, it will speed up your macro...

I hope it helps

Stephane Parent