Office中国论坛/Access中国论坛
标题:
[求助]如何计算一页中的行数?结果因行高不同±1?
[打印本页]
作者:
okmijn
时间:
2005-12-24 06:06
标题:
[求助]如何计算一页中的行数?结果因行高不同±1?
Dim a(100) As Integer
Dim m As Integer
Dim p As Integer
Dim q As Integer
Dim 累计行高 As Double
Dim 上边距 As Double
Dim 下边距 As Double
Dim 可打印长度 As Double
可打印长度 = Application.CentimetersToPoints(19)
累计行高 = 0
m = 0
For p = 1 To 199
累计行高 = 累计行高 + Rows(p).Height
If 累计行高 > 可打印长度 Then
p = p - 1
m = m + 1
a(m) = p
累计行高 = 0
End If
Next p
结果因行高不同±1?
单位转换的误差应该没那么大的啊!
还有没有其它的方法?
欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/)
Powered by Discuz! X3.3