用 VB 怎么 打印C盘根目录下 excel表格 文件名是 1.xls 定义变量的什么都写全啊 本人是菜鸟 谢谢啦!!! 5
展开全部
commonDialog控件是调用打印窗口的,不过excel打印设计到内部sheet,不知道你的表结构是啥样的?
Private Sub Command1_Click()
Dim beginpage, endpage, numcopies, orientation, i
CommonDialog1.CancelError = True
On Error GoTo errhandler
CommonDialog1.ShowPrinter
beginpage = CommonDialog1.FromPage
endpage = CommonDialog1.ToPage
numcopies = CommonDialog1.Copies
orientation = CommonDialog1.orientation
For i = 1 To numcopies
Next
Exit Sub
errhandler:
Exit Sub
end sub
Private Sub Command1_Click()
Dim beginpage, endpage, numcopies, orientation, i
CommonDialog1.CancelError = True
On Error GoTo errhandler
CommonDialog1.ShowPrinter
beginpage = CommonDialog1.FromPage
endpage = CommonDialog1.ToPage
numcopies = CommonDialog1.Copies
orientation = CommonDialog1.orientation
For i = 1 To numcopies
Next
Exit Sub
errhandler:
Exit Sub
end sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询