PDA

View Full Version : ListObjects(1).DataBodyRange.Cells.SpecialCells(xlCellTypeVisible).Count is erroneous



prabhafriend
10-14-2010, 08:26 AM
How to check
Workbooks("320_033110_Doral_Working").Sheets("Laser").ListObjects(1).DataBodyRange.Cells.SpecialCells(xlCellTypeVisible).Count
is great than 0 or not because it is giving error.
Kindly avoid On Error Please.

Bob Phillips
10-14-2010, 11:08 AM
On Error Resume Next
cnt=Workbooks("320_033110_Doral_Working").Sheets("Laser").ListObjects(1).DataBodyRange.Cells.SpecialCells(xlCellTypeVisible).Count
On Error Goto 0

prabhafriend
10-14-2010, 11:53 PM
No ways without Goto Statement?

Bob Phillips
10-15-2010, 09:40 AM
What's wrong with it?