Hello Ive tried to follow the above help but cant seem to get the command button to print the hidden sheets without showing the sheets.
this is the code ive used:
Sub printout()
'
'
Dim rngtoprint
With Application
.ScreenUpdating = False
.EnableEvents = False
End With
Set rngtoprint = Sheet5
rngtoprint.printout Preview:=False
Set rngtoprint = Sheet6
rngtoprint.printout Preview:=False
Set rngtoprint = Sheet7
rngtoprint.printout Preview:=False
Set rngtoprint = Sheet8
rngtoprint.printout Preview:=False
Set rngtoprint = Sheet9
rngtoprint.printout Preview:=False
Set rngtoprint = Sheet10
rngtoprint.printout Preview:=False
Set rngtoprint = Sheet11
rngtoprint.printout Preview:=False
Set rngtoprint = Sheet12
rngtoprint.printout Preview:=False
Set rngtoprint = Sheet13
rngtoprint.printout Preview:=False
With Application
.ScreenUpdating = True
.EnableEvents = True
End With
End Sub
Display More
My hidden sheets are sheet 5 to sheet 13 and named on the TAB as HO1 to HO9
I get a run-time error '1004', saying 'PrintOut method of Worksheet class failed'
can anyone help please?