+ Reply to Thread
Results 1 to 3 of 3

Excel 2003 ListObject question

  1. #1
    Frederick Chow
    Guest

    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. #2
    Jim Rech
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    | 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. #3
    Frederick Chow
    Guest

    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" <[email protected]> wrote in message
    news:[email protected]...
    > 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" <[email protected]> wrote in message
    > news:[email protected]...
    > | 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1