-1

In the below code RowHeight is throwing an error. How can I assign the value to RowHeight in the calling component.

This is calling component code, where I am assaiging values to ReDraw and other because assigning value to these property is straight forward

 Public Const MTXN_SS_TOTALS_ROW As Integer = 1   
 Private Const ROW_HEIGHT As Short = 500
 With sprICSTotalsGrid
        .ReDraw = False
        .DisplayRowHeaders = True
        .DisplayColHeaders = False
        .RowHeight(MTXN_SS_TOTALS_ROW, ROW_HEIGHT)
  end with

Below code is RowHeight public property from primary component

Public Property RowHeight(ByVal lRow As Integer) As Double
    Get
        Return sprSpread.get_RowHeight(lRow)
    End Get
    Set(ByVal Value As Double)
        sprSpread.set_RowHeight(lRow, Value)

    End Set
End Property
vandy
  • 63
  • 8

1 Answers1

0

RowHeight is an indexed property. It acts almost like an array property, where the Integer part tells the property which value to update or retrieve. Assign to it as you would assign to an array index, like this:

sprICSTotalsGrid.RowHeight(MTXN_SS_TOTALS_ROW) = CDbl(ROW_HEIGHT)
Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794