表大爷学习网 首页 VB篇 正文

怎样才能让Excel表格双面打印

2017-02-10 20:15 | 发布者: | 查看: 4,276 | 评论: 0

简介: Sub 奇偶页分别打印() Dim i%, Ps% Ps = ExecuteExcel4Macro("GET.DOCUMENT(50)") '用宏表函数取总页数 MsgBox "现在打印奇数页,按确定开始." For i = 1 To Ps Step 2 ActiveSheet.PrintOut from:=i, To:=i Next i MsgBox "现在打印偶数页,按确定开始." For i = 2 To Ps Step 2 ActiveSheet.PrintOut from:=i, To:=i Next i End Sub

Sub 奇偶页分别打印()
Dim i%, Ps%
Ps = ExecuteExcel4Macro(“GET.DOCUMENT(50)”) ‘用宏表函数取总页数
MsgBox “现在打印奇数页,按确定开始.”
For i = 1 To Ps Step 2
ActiveSheet.PrintOut from:=i, To:=i
Next i
MsgBox “现在打印偶数页,按确定开始.”
For i = 2 To Ps Step 2
ActiveSheet.PrintOut from:=i, To:=i
Next i
End Sub

会员评论

相关分类

推荐阅读

返回顶部