View Single Post
  #22   Report Post  
Posted to microsoft.public.excel.misc
Norman Jones
 
Posts: n/a
Default Macro for hiding rows

Hi KL,

How bizarre! Have you made any progress in further research? Any
hypothesis on why this happens?


In 'serious' code, I invariably use the segmenting ideas that emanated from
the quoted thread, so subsequent consideration has been relegated towards
the lower end of my (lengthy) 'must investigate' list. However, if I get
bored over the festive period, I will endeavour to find a reproducible
pattern.

Also, I just thought your sample code might run slightly faster if you
avoid the looping in setting up the data:


Undoubtedly, but very little thought went into the demo!

Have a happy holiday!

---
Regards,
Norman


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

As for the paradox, I noted in the past that it is possible to provoke
the solid range syndrome at points below 8192 non-contiguous areas. See,
for example:
http://tinyurl.com/8zvnd.


How bizarre! Have you made any progress in further research? Any
hypothesis on why this happens? Also, I just thought your sample code
might run slightly faster if you avoid the looping in setting up the data:

'=============
Public Sub Demo2()
Dim x As Long, y As Long

Application.ScreenUpdating = False
Range("A2:B2").Value = "XYZ"
Range("A1:B2").AutoFill Range("A1:B16384")

x = Range("A1:B16384") _
.SpecialCells(xlCellTypeBlanks).Areas.Count
y = Range("A1:A16384"). _
SpecialCells(xlCellTypeBlanks).Areas.Count
Application.ScreenUpdating = True

MsgBox "Rng1 Areas =" & x _
& vbNewLine & _
"Rng2 Areas =" & y
End Sub
'<<=============

Thanks and regards,
KL