Dim a, b, c, d, e, n, x, row, col As Integer
Dim lngCount As Long
With MSFlexGrid2
x = MSFlexGrid1.Rows
lngCount = 1
.Rows = lngCount
.Cols = 2
.TextMatrix(0, 0) = "高度"
.TextMatrix(0, 1) = "容积"
For n = 1 To x - 2
lngCount = lngCount + 1
.Rows = lngCount
a = Val(MSFlexGrid1.TextMatrix(n, 0))
b = Val(MSFlexGrid1.TextMatrix(n, 1))
e = Int((d - b) / (c - a))
.TextMatrix(lngCount - 1, 0) = e
.TextMatrix(lngCount - 1, 0) = a
.TextMatrix(lngCount - 1, 1) = b
a = a + 1
b = b + e
Next n
End With
没运行,不知道对错。看你自己改了
Dim lngCount As Long
With MSFlexGrid2
x = MSFlexGrid1.Rows
lngCount = 1
.Rows = lngCount
.Cols = 2
.TextMatrix(0, 0) = "高度"
.TextMatrix(0, 1) = "容积"
For n = 1 To x - 2
lngCount = lngCount + 1
.Rows = lngCount
a = Val(MSFlexGrid1.TextMatrix(n, 0))
b = Val(MSFlexGrid1.TextMatrix(n, 1))
e = Int((d - b) / (c - a))
.TextMatrix(lngCount - 1, 0) = e
.TextMatrix(lngCount - 1, 0) = a
.TextMatrix(lngCount - 1, 1) = b
a = a + 1
b = b + e
Next n
End With
没运行,不知道对错。看你自己改了
[url=http://www./html/6/6694/]极道金丹[/url][url=http://www./html/2/2849/]九阴九阳[/url][url=http://www./html/2/2596/]凡人修仙传[/url]