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

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