Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2003 ListObject question
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 | | |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Thanks for your help
Hi Jim,
Really thanks for your hint. I will try to work on my remaining problem on my own. Frederick Chow Hong Kong,. "Jim Rech" wrote in message ... 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 | | |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Question for MVP - install Excel 2003 on MS Server 2003 | Setting up and Configuration of Excel | |||
ListObject in Excel 2000 ? | Excel Discussion (Misc queries) | |||
reference vsto Excel ListObject in Vb.Net 2005 project/app | Excel Programming | |||
LISTOBJECT question | Excel Programming | |||
listobject ... Excel2003 | Excel Programming |