Type | Description | |||
Index as Long | A long expression that indicates the index of the item where cells are merged. | |||
ColIndex as Variant | A long expression that indicates the column's index | |||
Variant | A long expression that indicates the index of the cell that's merged with, a safe array that holds the indexes of the cells being merged. |
The following VB sample merges first three cells in a single one:
With List1.Items .CellMerge(.FirstVisibleItem, 0) = 1 .CellMerge(.FirstVisibleItem, 0) = 2 End With
or
With List1.Items .CellMerge(.FirstVisibleItem, 0) = Array(1, 2) End With
The following VB sample unmerges the first visible cell:
With List1.Items .CellMerge(.FirstVisibleItem, 0) = -1 End With
The following C++ sample merges first three cells in a single one:
CItems items = m_list.GetItems(); items.SetCellMerge( items.GetFirstVisibleItem(), COleVariant( long(0) ), COleVariant( long(1) ) ); items.SetCellMerge( items.GetFirstVisibleItem(), COleVariant( long(0) ), COleVariant( long(2) ) );
The following VB.NET sample merges first three cells in a single one:
With AxList1.Items .CellMerge(.FirstVisibleItem, 0) = 1 .CellMerge(.FirstVisibleItem, 0) = 2 End With
or
With AxList1.Items Dim m() As Integer = {1, 2} .CellMerge(.FirstVisibleItem, 0) = m End With
The following C# sample merges first three cells in a single one:
axList1.Items.set_CellMerge(axList1.Items.FirstVisibleItem, 0, 1); axList1.Items.set_CellMerge(axList1.Items.FirstVisibleItem, 0, 2);
or
int[] m = {1,2}; axList1.Items.set_CellMerge(axList1.Items.FirstVisibleItem, 0, m);
The following VFP sample merges first three cells in a single one:
with thisform.List1.Items .CellMerge(.FirstVisibleItem,0) = 1 .CellMerge(.FirstVisibleItem,0) = 2 endwith