# SOS！Help！在打印表格时，如何缩短每列的宽度！急！哪位大侠帮帮我！谢谢了！（一次性能给的最多分数，分不够的话，请注明我下次给！说话一向算话。）

kill_jp 2001-11-27 09:23:59

（分不够，请注明我下次给！说话一向算话。）

'打印竖分隔线
Dim HightRows As Single
HightRows = 205 'HightRows = RowHight * Page1 'modify01
For J = 0 To 22
Printer.Line (A(J), 29)-(A(J), HightRows)
Next
Printer.Line (4, 29)-(4, HightRows) '左竖分隔线
Printer.Line (A(22) + 15, 29)-(A(22) + 15, HightRows) '右竖分隔线

'打印横分割线。
Dim RowHight As Single
RowHight = 8
Dim M As Integer
Printer.CurrentY = 37
For M = 1 To Page1 + 2 '总共21条记录，最后一条存放 各列合计。
Printer.Line (4, Printer.CurrentY)-(A(22) + 15, Printer.CurrentY) 'modify x+50
Printer.CurrentY = Printer.CurrentY + RowHight
Next
...全文
254 16 打赏 收藏 举报

16 条回复

81083 2001-12-13
• 打赏
• 举报

ok
Jneu 2001-11-29
• 打赏
• 举报

Jneu 2001-11-29
• 打赏
• 举报

Dim A(22) As Single
Printer.FontSize = 12
For J = 0 To 22
StrHead = StrHead & CStr(rs.Fields(J).Name) & " "
A(J) = Printer.TextWidth(StrHead) - 5
'Debug.Print A(J)
kill_jp 2001-11-29
• 打赏
• 举报

Dim A(22) As Single
Printer.FontSize = 12
For J = 0 To 22
StrHead = StrHead & CStr(rs.Fields(J).Name) & " "
A(J) = Printer.TextWidth(StrHead) + 5
'Debug.Print A(J)
Jneu 2001-11-29
• 打赏
• 举报

kill_jp 2001-11-29
• 打赏
• 举报

kill_jp 2001-11-29
• 打赏
• 举报

Jneu 2001-11-29
• 打赏
• 举报

(A(J), 29)-(A(J)-6, HightRows)

kill_jp 2001-11-29
• 打赏
• 举报

shkingstargroup 2001-11-27
• 打赏
• 举报

Richard2001 2001-11-27
• 打赏
• 举报

kill_jp 2001-11-27
• 打赏
• 举报

basey 2001-11-27
• 打赏
• 举报

• 打赏
• 举报

kill_jp 2001-11-27
• 打赏
• 举报

Help!help me!
kill_jp 2001-11-27
• 打赏
• 举报

7681

VB 基础类

2001-11-27 09:23