AddItem Method (MSHFlexGrid)

       

Adds a row to an MSHFlexGrid. This property doesnÆt support named arguments.

Syntax

object.AddItem(string, index, number)

The AddItem method syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
string Required. A string expression displayed in the newly added row. To add multiple strings (for multiple columns in the row), use the tab character (vbTab) to separate each string.
index Optional. A Long value indicating the position within the control. This position is where the new row is placed. For the first row, index=0. If index is omitted, the new row becomes the last row in the band. Note that index is BandColIndex in the MSHFlexGrid.
number Optional. A Long value indicating the number of the band to which the row is added.

Remarks

If the MSHFlexGrid doesnÆt contain any bands (it is bound to a non-hierarchical Recordset) the BandNumber parameter is optional. If specified it must be 0. If the BandDisplay property is set to horizontal and the MSHFlexGrid is bound to a hierarchical Recordset, the BandNumber parameter is required. If the BandDisplay property is set to vertical, the BandNumber parameter is only needed if the band is ambiguous. The index parameter is always optional.