LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Flickering edit bar during loop

I have a loop that polls cells for format details, works
fine. However, if I have a worksheet object selected, the
edit bar flickers with the contents of the active cell
(that was active before selecting the object).

For demonstration:
Create a large used range, with cell entries in say A1
and K800
Select a cell entry, then an object

Sub Test()
Dim r As Range, ur As Range
Dim j As Variant 'normally a long for formats

Set ur = ActiveSheet.UsedRange
For Each r In ur

'edit bar flickers with previous active cell contents
j = r.Interior.ColorIndex

'comment j = format, un-comment j = value
'and edit bar does not flicker
'j = r.Value

Next
End Sub

Disabling screenupdating prevents the flicker and speeds
up the loop, a bit. But still significantly slower than if
a cell is selected. If a chart is selected as an active
chart (rather than merely as a chart object) the flicker
does not occur, but speed is also reduced.

Edit bar flicker only occurs if polling for cell format
attributes, of cells on the same sheet as the selected
object.

I get same results in XL97 & XL2K. I'm perplexed!

Any ideas how to avoid this flicker much appreciated, if
possible without disabling screenupdating or deselecting
the object.

TIA
Sandy
savituk yahoo co uk

 
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
FLICKERING SCREEN WHEN WORKING Henning Excel Discussion (Misc queries) 0 April 3rd 07 03:08 PM
Embedded Object Flickering dlerh Excel Discussion (Misc queries) 0 May 2nd 06 07:56 PM
FLICKERING...(fore ground font color with flickering).. Eddy Stan Excel Discussion (Misc queries) 5 March 23rd 06 06:20 PM
Edit this macro code to loop and end GarToms Excel Discussion (Misc queries) 1 January 27th 06 12:50 PM
Loop Edit Todd Huttenstine[_2_] Excel Programming 1 November 22nd 03 08:41 PM


All times are GMT +1. The time now is 03:01 PM.

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"