|
求助
帮我看一下,这个宏为什么不能连续打印阿,谢谢
Set rr = CreateObject("Scripting.FileSystemObject")
Set r = rr.GetFolder("D:\代理账单\08.12.25-09.01.21")
For Each i In r.Files
Workbooks.Open Filename:=("D:\代理账单\08.12.25-09.01.21\" + i.Name + "")
Sheets("NSS 结算表").Select
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1, Collate _
:=False
Sheets("pp").Select
If Range("A2") <> blank Then
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1, Collate _
:=False
End If
Sheets("CHB").Select
If Range("A2") <> blank Then
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1, Collate _
:=False
End If
Sheets("CHB (FCR)").Select
If Range("A2") <> blank Then
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1, Collate _
:=False
End If
Sheets("FCR").Select
If Range("A2") <> blank Then
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1, Collate _
:=False
End If
Sheets("FC").Select
If Range("A2") <> blank Then
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1, Collate _
:=False
End If
ActiveWindow.Close savechanges:=True
Next
'
End Sub |
|