View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Printing a hidden sheet

Hi Sungeri,

Try removing the selection:

Sub Button11_Click()
Sheets("Print Ticket")..PrintOut Copies:=1, Collate:=True
End Sub

Selections are rarely necessary and are often inefficient.

---
Regards,
Norman



"sungen99" wrote in
message ...

The below macro works just fine when the worksheet is not hidden. But
when it is the macro bombs out.




Sub Button11_Click()
Sheets("Print Ticket").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Sheets("Form").Select
Range("E9:F9").Select
End Sub


--
sungen99
------------------------------------------------------------------------
sungen99's Profile:
http://www.excelforum.com/member.php...fo&userid=9144
View this thread: http://www.excelforum.com/showthread...hreadid=505722