Sub test()
Dim s$, i%, A
For i = 1 To Sheets.Count
s = s & "," & i
Next i
s = InputBox("要打印的工作表索引:" & vbCrLf _
& "比如3,4,5,表示打印第3、第4、第5张工作表", "选择", Mid(s, 2))
If s = "" Then End
A = VBA.Split(s, ",")
For i = 0 To UBound(A)
Sheets(A(i) * 1).PrintOut
Next i
End Sub
Sub test()
Dim s$, i%, A
For i = 1 To Sheets.Count
s = s & "," & i
Next i
s = InputBox("要打印的工作表索引:" & vbCrLf _
& "比如3,4,5,表示打印第3、第4、第5张工作表", "选择", Mid(s, 2))
If s = "" Then End
A = VBA.Split(s, ",")
For i = 0 To UBound(A)
Sheets(A(i) * 1).PrintOut
Next i
End Sub