Keep display steady while macro runs

S

Salman

Hi. I have a simple macro that cuts and pastes values from
different tabs to an output tab. Sample code is:

Sheets("addressing").Select
Range("svcstack").Select
Selection.Copy
Sheets("Output driver page").Select
Range("cell1").Select
Selection.PasteSpecial Paste:=xlValues

Problem is that while the code runs, each tab selected is
displayed. I would like to keep the output tab, call
it "output", displayed as the macro runs. Please help.

Thanks
 
B

Biff

Don't forget to restore that at the end of the macro:

Sub YourMacro()

Application.ScreenUpdating = False

Your code goes here

Application.ScreenUpdating = True

End Sub

Biff
 
D

D.S.

You didn't say which version you are running.

Have your code select the tab of your preference, then turn off screen
refreshing until macro is finished, the last line before <end sub> turn
"screenrefreshing" back on.

Depending on which version you are running, it may be called screen
updating.

application.screenupdating=false
application.screenupdating=true


d.s.
Donald (e-mail address removed)
 

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