Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Change the number of table rows

The following example changes the number of table rows to just 20 rows and displays the first non-fixed table column/row (with the index that equals the number of fixed rows/columns) as the first column/row after the fixed columns/rows.

Let's have the PmiAx graphic item in the oAx variable placed in the image editor (this graphic item is set to the PmTable ActiveX object).

Example:
Dim nRows, oAxTable, i
Set oAxTable = oAx.Acx
nRows = oAxTable.Rows
If nRows > 20 Then
  For i=21 To nRows
    oAxTable.RemoveRow - 1
  Next
Else
  If nRows > 20 Then
    For i=nRows To 19
      oAxTable.InsertRow - 1
    Next
  End If
End If
oAxTable.RowFirstVisible = oAxTable.FixedRows
oAxTable.ColFirstVisible = oAxTable.FixedCols
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice