Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sheets("Print Ticket").PrintOut Copies:=1, Collate:=True
This line alone should do the trick -- http://HelpExcel.com 1-888-INGENIO 1-888-464-3646 x0197758 "sungen99" wrote: 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "sungen99" wrote: 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 try unhiding the sheet whilst it is printed and then hiding it again E.g Sub Button11_Click() sheets("print ticket").visible = xlsheetvisible Sheets("Print Ticket").Select ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True sheets("print ticket").visible = xlsheetveryhidden Sheets("Form").Select Range("E9:F9").Select End Sub hope this helps |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thank you all! -- sungen99 ------------------------------------------------------------------------ sungen99's Profile: http://www.excelforum.com/member.php...fo&userid=9144 View this thread: http://www.excelforum.com/showthread...hreadid=505722 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
try this from anywhere in the workbook. Selections are NOT necessary.
Sub printhiddensheet() Application.ScreenUpdating = False With Sheets("sheet8") .Visible = True .PrintOut .Visible = False End With Application.ScreenUpdating = True End Sub -- Don Guillett SalesAid Software "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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Printing a hidden image | Excel Discussion (Misc queries) | |||
Printing hidden rows | Excel Discussion (Misc queries) | |||
I need my Hidden Rows to stay hidden when I print the sheet. | Excel Discussion (Misc queries) | |||
Printing hidden comments | Excel Discussion (Misc queries) | |||
Saving hidden data with a worksheet (preferably without using a hidden sheet) | Excel Programming |