|
修改一下
- Sub 打印()
- Dim EN As Long, i As Integer, ARR
- If Cells(12, 1) = "" Then MsgBox "你尚未输入发货内容!": Exit Sub
- ActiveSheet.PrintOut Copies:=1
- With Sheets("送货记录")
- EN = .Cells(65500, 4).End(3).Row + 1
- For i = 12 To [A20].End(xlUp).Row
- ARR = Range(Cells(i, 1), Cells(i, 8))
- .Cells(EN + i - 12, 4).Resize(, 8) = ARR
- .Cells(EN + i - 12, 1).Resize(, 3) = Array(Mid([F2], 3), [B6], [G6]) '送货单号,客户名称,送货日期
- Next i
- Cells(2, 6) = "№:HZ" & Year(Now()) & Format(Month(Now()), "00") & Format(Right(Cells(2, 6), 3) + 1, "000")
- Range("A12:H19").ClearContents
- End With
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|