Worksheet - ListObject

EventDescription
BeforeAddDataBoundRowOccurs before you attempt to add a new row to the list object that is bound to data
BeforeDoubleClickOccurs when the listobject control is double clicked
BeforeRightClick 
BindingContextChanged 
Change 
DataBindingFailure 
DataMemberChanged 
DataSourceChanged 
Deselected 
Disposed 
ErrorAddDataBoundRow 
OriginalDataRestored 
SelectedIndexChanged 
SelectionChange 

This list is slightly different to the VBA Events


You can create ListObjects dynamically


Microsoft.Office.Tools.Excel.ListObject AddListObject( 
   Microsoft.Office.Interop.Excel.Range range,
   string name)

Public Function AddListObject( _ 
   ByVal range As Microsoft.Office.Interop.Excel.Range, _
   ByVal name As String) As _
   Microsoft.Office.Tools.Excel.ListObject


Excel.Worksheet vstosheet; 
Microsoft.Office.Tools.Excel.ListObject listobject;
vstosheet = ActiveWorkbook.Sheets(2).GetVSTOObject
listobject = vstosheet.Controls.AddListObject(Range("A1","B10"),
                     new System.Guid(---).ToString())


© 2022 Better Solutions Limited. All Rights Reserved. © 2022 Better Solutions Limited TopPrevNext