Type | Description | |||
Freeze as Boolean | A Boolean expression that specifies whether the control' events are froze or unfroze |
The following samples show how you can lock the events while adding columns, items to the control:
' Change event - Occurs when the user changes the cell's content. Private Sub G2antt1_Change(ByVal Item As EXG2ANTTLibCtl.HITEM,ByVal ColIndex As Long,NewValue As Variant) With G2antt1 Debug.Print( "Change event" ) End With End Sub With G2antt1 .FreezeEvents True .BeginUpdate With .Columns .Add("C1").Def(exCellHasCheckBox) = True .Add "C2" End With With .Items .CellValue(.AddItem("SubItem 1.1"),1) = "SubItem 1.2" .CellValue(.AddItem("SubItem 2.1"),1) = "SubItem 2.2" End With .EndUpdate .FreezeEvents False End With