Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default Flashing screen even with Application.ScreenUpdating = False

I am trying to pivot and hide between 2 sheets and make it look professional.

Event with this code I get the flashing screen as soon as the sheet gets visible.
Is there an other option that I could use?

Application.ScreenUpdating = False

If Sheets("Selection").Visible = False Then Sheets("Selection").Visible = True
Sheets("Selection").Select

Thank's ahead.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Flashing screen even with Application.ScreenUpdating = False

Hi Bobby,

Am Sat, 10 Nov 2012 09:31:55 -0800 (PST) schrieb Bobby:

Application.ScreenUpdating = False

If Sheets("Selection").Visible = False Then Sheets("Selection").Visible = True
Sheets("Selection").Select


try:
With Sheets("Selection")
If .Visible = False Then .Visible = True
Application.Goto .Range("A1")
End With


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default Flashing screen even with Application.ScreenUpdating = False

On Saturday, November 10, 2012 12:31:55 PM UTC-5, Bobby wrote:
I am trying to pivot and hide between 2 sheets and make it look professional.



Event with this code I get the flashing screen as soon as the sheet gets visible.

Is there an other option that I could use?



Application.ScreenUpdating = False



If Sheets("Selection").Visible = False Then Sheets("Selection").Visible = True

Sheets("Selection").Select



Thank's ahead.


Hi Claus!

I did try your way but unfortunately I get the flashing gray bar still!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Flashing screen even with Application.ScreenUpdating = False

Hi Bobby,

Am Sat, 10 Nov 2012 10:32:48 -0800 (PST) schrieb Bobby:

I did try your way but unfortunately I get the flashing gray bar still!


do you refresh the pivot table when you activate this sheet?


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Flashing screen even with Application.ScreenUpdating = False

I like Claus' approach except for the If...Then. If you want the sheet
visible then just set that regardless of whether it's currently visible
or not. Testing ALWAYS requires more processing and so should be
avoided when not necessary so code performance is optimal...

With Sheets("Selection")
.Visible = xlSheetVisible: Application.GoTo .Range("A1")
End With 'Sheets("Selection")

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Flashing screen even with Application.ScreenUpdating = False

The following statement is likely the culprit...

Application.GoTo .Range("A1")

If you just want the sheet visible and A1 the active cell then try...

With Sheets("Selection")
.Visible = xlSheetVisible: .Cells(1).Activate
End With 'Sheets("Selection")

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default Flashing screen even with Application.ScreenUpdating = False

On Saturday, November 10, 2012 3:44:24 PM UTC-5, GS wrote:
The following statement is likely the culprit...



Application.GoTo .Range("A1")



If you just want the sheet visible and A1 the active cell then try...



With Sheets("Selection")

.Visible = xlSheetVisible: .Cells(1).Activate

End With 'Sheets("Selection")



--

Garry



Free usenet access at http://www.eternal-september.org

Classic VB Users Regroup!

comp.lang.basic.visual.misc

microsoft.public.vb.general.discussion


After trying I still get the flashing gray bar
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Flashing screen even with Application.ScreenUpdating = False

Bobby formulated on Saturday :
On Saturday, November 10, 2012 3:44:24 PM UTC-5, GS wrote:
The following statement is likely the culprit...



Application.GoTo .Range("A1")



If you just want the sheet visible and A1 the active cell then try...



With Sheets("Selection")

.Visible = xlSheetVisible: .Cells(1).Activate

End With 'Sheets("Selection")



--

Garry



Free usenet access at http://www.eternal-september.org

Classic VB Users Regroup!

comp.lang.basic.visual.misc

microsoft.public.vb.general.discussion


After trying I still get the flashing gray bar


What grey bar? Are you talking about the Taskbar, OR the sheet tab
strip?

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Flashing screen even with Application.ScreenUpdating = False

I just tested the following code and the only thing I viewed on my
screen was the sheet appearing with A1 selected *after* I dismissed the
MsgBox.

Sub ShowSheet()
Application.ScreenUpdating = False
With Sheets("Sheet2")
.Visible = xlSheetVisible: Application.Goto .Cells(1)
End With 'Sheets("Sheet2")
Application.ScreenUpdating = True
End Sub 'ShowSheet

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default Flashing screen even with Application.ScreenUpdating = False

On Saturday, November 10, 2012 5:39:20 PM UTC-5, GS wrote:
Bobby formulated on Saturday :

On Saturday, November 10, 2012 3:44:24 PM UTC-5, GS wrote:


The following statement is likely the culprit...








Application.GoTo .Range("A1")








If you just want the sheet visible and A1 the active cell then try...








With Sheets("Selection")




.Visible = xlSheetVisible: .Cells(1).Activate




End With 'Sheets("Selection")








--




Garry








Free usenet access at http://www.eternal-september.org




Classic VB Users Regroup!




comp.lang.basic.visual.misc




microsoft.public.vb.general.discussion




After trying I still get the flashing gray bar




What grey bar? Are you talking about the Taskbar, OR the sheet tab

strip?



--

Garry



Free usenet access at http://www.eternal-september.org

Classic VB Users Regroup!

comp.lang.basic.visual.misc

microsoft.public.vb.general.discussion


Hi GS,
I am taking about the sheet tab strip.


  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Flashing screen even with Application.ScreenUpdating = False

Bobby presented the following explanation :
Hi GS,
I am taking about the sheet tab strip.


What you see there is what happens when your macro ends and
ScreenUpdating automatically turns back on. The 'flicker' you refer to
is the result of the tab strip 'refreshing' itself to include the newly
visible sheetname.

Perhaps if you post your *entire code* it will shed more light for us.
But there will always be visible evidence whenever anything in the
active window updates/refreshes. Of courses, how & when this occurs
depends on the order of execution of the code causing it to happen.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Flashing screen even with Application.ScreenUpdating = False

Just want to add that indiscriminate use of turning ScreenUpdating OFF
in sub procedures called by other procedures will cause ScreenUpdating
to automatically turn back on when those procedures that turn it off
end. If this is the case then sounds to me like some good code
management practices need to be adopted here!<IMO

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


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 flikering (even with ScreenUpdating = False) SpeeD Excel Programming 0 February 20th 09 03:13 PM
Screen still changes. Why ? (Application.Screenupdating = False not working Coza Excel Programming 1 March 21st 07 03:47 AM
Application.ScreenUpdating = False still causing screen to flash... [email protected] Excel Programming 3 January 5th 07 05:10 AM
How to set Application.ScreenUpdating = False for Gen use David_Williams_PG () Excel Discussion (Misc queries) 1 August 15th 06 12:06 PM
Application.screenUpdating = False Pamhall Excel Programming 1 December 17th 04 03:19 PM


All times are GMT +1. The time now is 11:06 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"