返回列表 上一主題 發帖

標籤紙列印問題

標籤紙列印問題

詳細說明如附件,很謝謝大家的幫忙![attach]1610[/attach]

人員資料.zip (11.68 KB)

回復 1# child
  1. Sub Ex()
  2.     Dim i&, R As Range, Y%
  3.     i = 2: Y = 1
  4.     With Sheet2
  5.         Do While .Cells(i, "b") <> ""
  6.            Set R = .Cells(i, "b")
  7.             With Sheet1.Cells(i - 1, Y)
  8.                 .Value = R & Chr(10) & R(1, 2) & R(1, 3) & R(1, 4) & Chr(10) & Chr(10) & R(1, 5) & Space(20) & R(1, 6) & "收" & Chr(10)
  9.                 .ColumnWidth = 33
  10.                 .Borders.LineStyle = xlContinuous
  11.                 .HorizontalAlignment = xlLeft
  12.                 .VerticalAlignment = xlCenter
  13.                 .IndentLevel = 1
  14.              End With
  15.             If Y = 3 Then
  16.              Y = 1: i = i + 1
  17.             Else
  18.                 Y = Y + 1
  19.             End If
  20.         Loop
  21.     End With
  22.     Sheet1.PrintOut
  23. End Sub
複製代碼

TOP

謝謝GBKEE 版主的幫忙,感激不盡^^

TOP

        靜思自在 : 得理要饒人,理直要氣和。
返回列表 上一主題