Help Center

MergeRowproperty

Returns or sets a value that determines which rows can have their contents merged. This property must be True to use the MergeCells property.

Windowspropertydoc-orphan
No implementation located. This member is documented, but the source scan found no matching declaration. It is likely declared in a header this scan does not resolve, or provided by a macro.

Syntax

PROPERTY MergeRow (BYVAL Index AS LONG) AS BOOLEAN
FUNCTION MergeRow (BYVAL Index AS LONG, BYVAL merge AS BOOLEAN)

Parameters

NameDescription
IndexThe zero-based index of the row you want to configure.
mergeTrue enables merging for that row; False (default) disables it.

Description

Returns or sets a value that determines which rows can have their contents merged. This property must be True to use the MergeCells property.

Remarks

For MergeRow to take effect, the following conditions must be met:

  • The MergeCells property must be set to a value other than flexMergeNever (0).
  • Adjacent cells in the specified row must contain the exact same text.
  • If you are trying to merge a block of cells both horizontally and vertically, the corresponding MergeCol property for those columns must also be considered.

Example

' 1. Enable merging globally (Restricted to cells with identical text) grid.MergeCells = flexMergeRestrictBoth

' 2. Specify that Row 0 is eligible for merging grie.MergeRow(0) = True

' 3. Assign duplicate text to see the effect grid.TextMatrix(0, 0) = "Region" grid.TextMatrix(0, 1) = "Region" ' These two cells will now appear as one

Reference