Excel 2007 ListObject question

F

Ferris

I have a data table in xl2007 that is a ListObject. What I would like
to be able to do is know which ListRow has been selected. In other
words, if I manually select a cell in a ListObject is there a way to
programatically know which ListRow that is? Banging my head for a bit
trying to noodle it out, any help will be greatly appreciated.

Thanks!
 
J

Jim Rech

Maybe you want something like this:

Sub a()
Dim MyList As ListObject
Dim RowNum As Long
Set MyList = ActiveCell.ListObject
RowNum = ActiveCell.Row - MyList.HeaderRowRange.Row
MsgBox RowNum
End Sub


--
Jim
|I have a data table in xl2007 that is a ListObject. What I would like
| to be able to do is know which ListRow has been selected. In other
| words, if I manually select a cell in a ListObject is there a way to
| programatically know which ListRow that is? Banging my head for a bit
| trying to noodle it out, any help will be greatly appreciated.
|
| Thanks!
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top