Worksheet - ListObject

EventDescription
BeforeAddDataBoundRowOccurs when a user attempts to add a new row. This event is not raised when new rows are added programmatically. Useful when validating the data.
BeforeDoubleClickOccurs when the ListObject is double clicked
BeforeRightClickOccurs when the ListObject is right clicked
BindingContextChangedOccurs when the binding of the ListObject changes
ChangeOccurs when the contents of the ListObject are changed by a user or programmatically. The event is not raised when calculations cause the change
DataBindingFailureOccurs when the binding of the ListObject fails. This occurs when you try and add a second ListObject to a worksheet.
DataMemberChangedOccurs when the DataMember property is changed by a user or programmatically.
DataSourceChangedOccurs when the DataSource property is changed by a user or programmatically.
DeselectedOccurs when the selection is moved outside the ListObject.
ErrorAddDataBoundRowOccurs when an error occurs when attempting to add a new row, (eg violation, entering text in a numeric column)
OriginalDataRestoredOccurs when a changed value is restored to its original value as a consequence of an error occurring.
DisposedOccurs when the ListObject is disposed of. Typically raised by garbage collection.
SelectedOccurs when the ListObject is selected
SelectedIndexChangedOccurs when the selected index changes. This is the currently selected item in the ListObject.
SelectionChangeOccurs when the selection within the ListObject changes.

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())


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