Visually Surpressing A Macro

J

John Calder

Hi

I run Excel 2000

I was wondering if there is some code that I can use to visually supress a
macro when it runs.

When I presently run a macro that initiates a number of various tasks the
sheet "jump's" about as the macros run. Its not a big deal but would be nice
if I could surpress this screen movement.

Is it possible?

Thanks

John
 
D

Dave Peterson

Application.screenupdating = false
your code that jumps around
Application.screenupdating = true


It may make the code easier to update if you drop all the .selects and
..activates. Just work directly with the range (for example).

worksheets("sheet99").select
range("a99").select
activecell.value = 33

could be replaced with:
worksheets("sheet99").range("a99").value = 33
 
J

John Calder

Dave, thanks for your prompt response.

I should have mentioned that I am not a visual basic user. Could you be a
little more specific on what part of the code I should use and where exactly
should I copy it to?

Thanks
 
D

Dave Peterson

Sub YourSubNameHere()
Application.screenupdating = false 'right at the top


your code that jumps around


Application.screenupdating = true 'right at the bottom
End Sub
 
J

John Calder

Dave

Thanks a lot...it works great !!

John




Dave Peterson said:
Sub YourSubNameHere()
Application.screenupdating = false 'right at the top


your code that jumps around


Application.screenupdating = true 'right at the bottom
End Sub
 

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