Hello, I need a bit of help with this one.
I have a macro that should print the 1st page in another Workbook, but I only have this macro witch print the active page of the Workbook.
Question is: How can I specify the sheet I want to be printed?
Private Sub CommandButton8_Click()
Dim x As String
x = "Pakkaus01.xls"
Workbooks.Open ActiveWorkbook.Path & "\" & x, 3
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Application.DisplayAlerts = False
Workbooks("Pakkaus01.xls").Close
Application.DisplayAlerts = True
End Sub
I have a macro that should print the 1st page in another Workbook, but I only have this macro witch print the active page of the Workbook.
Question is: How can I specify the sheet I want to be printed?
Private Sub CommandButton8_Click()
Dim x As String
x = "Pakkaus01.xls"
Workbooks.Open ActiveWorkbook.Path & "\" & x, 3
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Application.DisplayAlerts = False
Workbooks("Pakkaus01.xls").Close
Application.DisplayAlerts = True
End Sub