Excel 2003 ListObject question
This will help with the first two questions. I'm sure you'll want to tackle
the third yourself as an exercise.
Sub a()
Dim Counter As Integer
MsgBox "Number of lists on this sheet: " & _
Sheet1.ListObjects.Count
For Counter = 1 To Sheet1.ListObjects.Count
If Not Intersect(ActiveCell, Sheet1.ListObjects(Counter) _
.DataBodyRange) Is Nothing Then
MsgBox "Active cell is in: " & Sheet1.ListObjects(Counter).Name
End If
Next
End Sub
--
Jim
"Frederick Chow" wrote in message
...
| Hi all,
|
| I am new to the ListObject in Excel 2003. Some questions:
|
| 1. How to check if an listobject exist in a worksheet?
| 2. How to determine if the active cell resides on a listobject?
| 3. How to determine if the active cell resides on a specific listcolumn of
| ANY listobject?
|
| Thanks for your help in advance.
|
| Frederick Chow
| Hong Kong
|
|
|