Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question for MVP - install Excel 2003 on MS Server 2003 WCM Setting up and Configuration of Excel 4 February 13th 08 06:59 PM
ListObject in Excel 2000 ? NJ Excel Guru Excel Discussion (Misc queries) 1 November 15th 05 12:40 PM
reference vsto Excel ListObject in Vb.Net 2005 project/app softengine Excel Programming 0 September 27th 05 08:21 PM
LISTOBJECT question Marek Excel Programming 0 September 5th 04 10:21 AM
listobject ... Excel2003 Jim C.[_4_] Excel Programming 0 April 3rd 04 10:13 PM


All times are GMT +1. The time now is 08:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"