ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Keep display steady while macro runs (https://www.excelbanter.com/excel-programming/281524-keep-display-steady-while-macro-runs.html)

Salman[_2_]

Keep display steady while macro runs
 
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

Jase

Keep display steady while macro runs
 
application.screenupdating = false
-----Original Message-----
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
.


Biff

Keep display steady while macro runs
 
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


-----Original Message-----
application.screenupdating = false
-----Original Message-----
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
.

.


D.S.[_2_]

Keep display steady while macro runs
 
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
"Salman" wrote in message
...
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





All times are GMT +1. The time now is 04:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com