vb 按钮打印 指定路径1个EXCEl文件sheet1
vb按钮打印指定路径1个EXCEl文件Command1按钮一个路径:d:\1.xlsx希望可以直接点击按钮即可打印1.xlsx内容,请大神指教代码无法运行PrivateS...
vb 按钮打印 指定路径1个EXCEl文件
Command1按钮一个
路径:d:\1.xlsx
希望可以直接点击按钮即可打印1.xlsx内容,请大神指教
代码无法运行
Private Sub Command1_Click()
Dim file$, folder$, wb As Workbook
folder = "d:\"
file = Dir(folder & "1.xls")
Do While file <> ""
Set wb = GetObject(folder & file)
wb.Worksheets("sheet1").PrintOut
wb.Close
file = Dir
Loop
End Sub 展开
Command1按钮一个
路径:d:\1.xlsx
希望可以直接点击按钮即可打印1.xlsx内容,请大神指教
代码无法运行
Private Sub Command1_Click()
Dim file$, folder$, wb As Workbook
folder = "d:\"
file = Dir(folder & "1.xls")
Do While file <> ""
Set wb = GetObject(folder & file)
wb.Worksheets("sheet1").PrintOut
wb.Close
file = Dir
Loop
End Sub 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询