View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
William[_2_] William[_2_] is offline
external usenet poster
 
Posts: 227
Default Selection of non-empty cells

Hi Adrian

Sub test()
Dim r As Range
Set r = Union(Cells.SpecialCells(xlCellTypeConstants, 23), _
Cells.SpecialCells(xlCellTypeFormulas, 23))
r.Select
End Sub


--
XL2002
Regards

William



"Adrian" wrote in message
...
| Hi,
|
| How do I select all the non-empty cells in VBA code ?
| Thanks.
|
| --
| Regards,
| Adrian
|
|