|
莞风 发表于 2014-4-8 11:21
ok了
你应该发到
ExcelVBA程序开发http://club.excelhome.net/forum-2-1.html
仅供参考
- Sub 打印()
- Dim r As Long, S1 As Worksheet, S2 As Worksheet
- Set S1 = Sheets("权健医学")
- Set S2 = Sheets("权健记录")
- ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True '打印
- r = S2.[A65536].End(xlUp).Row + 1 'Sheets("权健记录")最后空白行
- With S1
- 'Sheets("权健记录")最后空白行的A:I写入数组:"权健医学"工作表的"日期,收货人,收货人地址,目的地,件数,重量,体积,费率,费用"
- S2.Cells(r, 1).Resize(, 9) = Array(.[B44], .[A17], .[B20], .[D4], .[A26], .[E26], .[J34], .[B31], .[B37])
- End With
- End Sub
复制代码 |
|