Posted 13 August 2018, 3:27 am EST - Updated 30 September 2022, 3:11 am EST
Hi,
I have an active x control that I am using on vb6:
We currently updated this control from vaSpread version: 2.5.0.1, to the new fpSpread version 8.0.28.
One of tables isn’t created the same as it was created in the older version.
The code for creating the table (We didn’t change the code after upgrading to the new control):
Private Sub BuildSuppRepTable()
Dim Temptxt As String
SprdSuppRepUnits.VisibleCols = 5
SprdSuppRepUnits.VisibleRows = 5
SprdSuppRepUnits.AutoSize = True
SprdSuppRepUnits.SelectBlockOptions = 0
SprdSuppRepUnits.ColWidth(0) = 4
SprdSuppRepUnits.ColWidth(1) = 15
SprdSuppRepUnits.ColWidth(2) = 0
If CreatinineFlag Then
SprdSuppRepUnits.ColWidth(3) = 15
SprdSuppRepUnits.ColWidth(4) = 15
Else
SprdSuppRepUnits.ColWidth(3) = 0
SprdSuppRepUnits.ColWidth(4) = 0
End If
SprdSuppRepUnits.ColWidth(5) = 15
’ SprdSuppRepUnits.ColWidth(6) = 0
SprdSuppRepUnits.RowHeight(0) = 25
SprdSuppRepUnits.RowHeight(-1) = 15
'Define Column headers
SprdSuppRepUnits.Col = 0
SprdSuppRepUnits.Row = 0
SprdSuppRepUnits.Text = “#”
SprdSuppRepUnits.Col = 1
SprdSuppRepUnits.Row = 0
SprdSuppRepUnits.Text = “Concentration Units”
SprdSuppRepUnits.Col = 3
SprdSuppRepUnits.Text = “Creatnine Concentration Units”
SprdSuppRepUnits.Col = 4
SprdSuppRepUnits.Text = “Creatnine Reportiong Units”
SprdSuppRepUnits.Col = 5
SprdSuppRepUnits.Text = Protein Units
SprdSuppRepUnits.Col = -1
SprdSuppRepUnits.Row = -1
SprdSuppRepUnits.Lock = True
Temptxt = % %/day µg µg/g ng ng/day µg µg/g %Hb/dL
'clip entire Supported Reporting Units List
SprdSuppRepUnits.Col = 1
SprdSuppRepUnits.Row = 1
SprdSuppRepUnits.Col2 = 5
SprdSuppRepUnits.Row2 = 10
If ClipString <> “” Then
MySpread.Clip = Temptxt
'count text-filled lines in spreadsheet
TotalSuppRepUnits = CalcSpreadSheetLines(SprdSuppRepUnits)
'save the initial number of lines sent
'InitialNoOfLines = TotalSuppRepUnits
End Sub
Private Function CalcSpreadSheetLines(MySpread As FPSpreadADO.fpSpread) As Integer
Dim i As Integer
For i = 1 To MySpread.MaxRows
MySpread.Col = 1
MySpread.Row = i
If StrComp(MySpread.Text, “”) = 0 Then
Exit For
End If
Next i CalcSpreadSheetLines = i - 1
End Function
I attached 2 screenshots that shows how it looks in the old version, and how it looks in the new version.
What should I fix in order that the new version will look and behave like the old one ?
Thanks,
Dror Farhi