LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 421
Default Suppressing screen flicker when sheet is activated

Hi Raj,

In general, a primary method to avoid
screen flicker, is to avoid the selection
of Excel objects, such as ranges, sheets
and workbooks.

With very few exceptions, it is neither
necessary, nor efficient to make such
selections; the preferable alternative is
to create object varisbles and then
manipulate the variable.

Another ploy, which has the incidental
advantage of increasing efficiency and
speed, is to avoid repeated read/write
worksheet operations; better is to read
and write data to and from arrays held
in memory, often as single operations.

Methods such as these, perhapsa allied
to the judicious use of the Applicaton's
ScreenUpdating property should
enhance speed / efficiency and largely
obviate the flicker problem.



---
Regards.
Norman


"Raj" wrote in message
...
Hi Norman,

I am sorry about opening a new thread for an existing question and
note to observe this in future. But, there is a substantial difference
between the issues involved in the two threads. In the earlier thread
subs across different worksheets were involved, whereas in the current
threat there is only one sub that is involved. I thought the
underlying causes for the problem (and the solution) could be
different and hence posted this afresh.

The Code:

Private Sub Worksheet_Activate()
Application.ScreenUpdating = False

'After this many variables are declared and initiated
'ptrange is a range object

Set ptrange = Worksheets(wsname)
Worksheets(wsname).Select
ptrange.Cells(4, 1).Select

' This is followed by code for creating a Pivot table in ptrange and
writing some values from that table into the current worksheet

'Lastly the following code is used to Activate the sheet containing
the code.
Application.EnableEvents = False
Me.Activate
Application.EnableEvents = True

End Sub


Thanks and Regards,
Raj





On Jun 4, 6:56 am, "Norman Jones"
wrote:
Hi Raj,

It neither necessary nor efficient to open a
new thread for an existing question.

Referring to your earlier thread, if you have
tried to implement Jon Peltier's approach
without success, then as indicated by Nate,
you should consder posting the problematic
code.

---
Regards.
Norman

"Raj" wrote in message

...

Hi,


I am using Application.Screenupdating = false at the beginning of the
sub and Application.Screeenupdating = true at the end of the sub. The
sub contains a line to activate another sheet to select a range in
that sheet. The sheet activation does flash on the screen, ie.
Application.Screenupdating = false seems to no longer work when a
sheeet is activated. How do I fix this issue?


Thanks in advance for the help.


Regards,
Raj


 
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 dim Excel Discussion (Misc queries) 4 November 28th 07 09:42 PM
List box screen flicker [email protected] Excel Discussion (Misc queries) 0 September 25th 07 02:37 PM
screen flicker mark kubicki Excel Programming 2 March 22nd 05 12:03 AM
Preventing screen flicker Paul Excel Discussion (Misc queries) 2 March 15th 05 09:39 PM
Screen Flicker JonWayn Excel Programming 1 November 1st 03 11:34 PM


All times are GMT +1. The time now is 06:15 AM.

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

About Us

"It's about Microsoft Excel"