tags:

views:

297

answers:

1

I need to access the Selected Event of all the listobjects in all the worksheets of my workbook but when I access worksheet.listobject, that object apparently belongs to Microsoft.Office.Interop.Excel.ListObject and so doesn't have any events where as the table list object belongs to Microsoft.Office.Tools.Excel.ListObject.

And I read that Microsoft.Office.Tools.Excel.ListObject.InnerObject = Microsoft.Office.Interop.Excel.ListObject

but i don't know how to use it.

Pls Help

Thanks, Kavita

+1  A: 

I think that you must use Microsoft.Office.Tools.Excel.ListObject.GetVstoObject(lstObj) where lstObj is a Microsoft.Office.Interop.Excel.ListObject to get the correct object. And it's only available with at Application-level Addin, not at Document-Level, you can read the documentation. From: MSDN info. And now you have also a ListObjectExtensions

More info about the events of Tools.Excel.ListObject at: MSDN Events

oterrada