Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Screen Updating


Hi all,
I have a macro that is called from another that includes the following
2 lines at the start

Application.ScreenUpdating = False
Sheet3.Activate
code here

Everytime this runs the screen jumps from another worksheet to Sheet3.
Is there any way to stop this from happening?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 621
Default Screen Updating

Depends where you go after you activate Sheet3 and do your stuff.

If you go from Sheet4 over to Sheet3, do something then come back you
will never see Sheet3

Application.ScreenUpdating = False
Sheet3.Activate
For Each cell In ActiveSheet.Range("A1:A45")
cell.Interior.ColorIndex = 6
Next
Sheet4.Activate

But, there is rarely any reason to activate a sheet or select things.

The above can be written without any screenupdating=false or
activations

For Each cell In Sheet3.Range("A1:A45")
cell.Interior.ColorIndex = 6
Next

Show us your "code here"


Gord

On Thu, 15 Dec 2011 01:47:07 +0000, vom
wrote:


Hi all,
I have a macro that is called from another that includes the following
2 lines at the start

Application.ScreenUpdating = False
Sheet3.Activate
code here

Everytime this runs the screen jumps from another worksheet to Sheet3.
Is there any way to stop this from happening?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,045
Default Screen Updating

On Thu, 15 Dec 2011 01:47:07 +0000, vom wrote:


Hi all,
I have a macro that is called from another that includes the following
2 lines at the start

Application.ScreenUpdating = False
Sheet3.Activate
code here

Everytime this runs the screen jumps from another worksheet to Sheet3.
Is there any way to stop this from happening?


Delete the sheet3.activate line
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,045
Default Screen Updating

On Thu, 15 Dec 2011 01:47:07 +0000, vom wrote:


Hi all,
I have a macro that is called from another that includes the following
2 lines at the start

Application.ScreenUpdating = False
Sheet3.Activate
code here

Everytime this runs the screen jumps from another worksheet to Sheet3.
Is there any way to stop this from happening?


Hit <enter too soon.

Deleting the sheet3.activate line would keep that from happening, but might have deleterious effects on the rest of the code, if it depends on the sheet being activated. It is unusual for VBA to require the sheet to be activated, so the subsequent code could probably be rewritten to deal with particular worksheets and ranges, rather than an activated sheet.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Screen flicker w/ Screen-Updating = False? Ray Excel Programming 7 August 28th 09 05:43 PM
screen updating miikka1978[_3_] Excel Programming 4 June 22nd 06 09:20 AM
Screen Updating Ben[_10_] Excel Programming 2 October 22nd 05 12:06 AM
Screen Updating KG[_4_] Excel Programming 0 January 16th 05 05:09 PM
Screen Updating Chilidog1000[_2_] Excel Programming 1 January 6th 04 08:18 PM


All times are GMT +1. The time now is 09:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"