Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi, I just can't get this to work - I keep getting Runtime error 1004 ? The aim is just to print to another printer called 'HP 1200 Tray 2' Any tips would be great. Thanks. *Sub Printer2() Dim STDprinter As String STDprinter = Application.ActivePrinter Application.ActivePrinter = "HP 1200 Tray 2 on HPBusinessInkjet1200:" ' change printer ActiveSheet.PrintOut ' prints the active sheet Application.ActivePrinter = STDprinter ' change back to standard printer End Sub* -- Cam ------------------------------------------------------------------------ Cam's Profile: http://www.excelforum.com/member.php...o&userid=27836 View this thread: http://www.excelforum.com/showthread...hreadid=513986 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() My guess: excel doesnt use the 32bit portname but it's 16bit sibling. e.g. MyPrinter on Ne01: manually set the printer to the one you want. type ?ActivePrinter in the immediate pane. use that string in your code. -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam Cam wrote in Hi, I just can't get this to work - I keep getting Runtime error 1004 ? The aim is just to print to another printer called 'HP 1200 Tray 2' Any tips would be great. Thanks. *Sub Printer2() Dim STDprinter As String STDprinter = Application.ActivePrinter Application.ActivePrinter = "HP 1200 Tray 2 on HPBusinessInkjet1200:" ' change printer ActiveSheet.PrintOut ' prints the active sheet Application.ActivePrinter = STDprinter ' change back to standard printer End Sub* |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() ..... your guess was spot on - you're a star. Thanks bud. -- Cam ------------------------------------------------------------------------ Cam's Profile: http://www.excelforum.com/member.php...o&userid=27836 View this thread: http://www.excelforum.com/showthread...hreadid=513986 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Printing problem in excel | Excel Discussion (Misc queries) | |||
Excel 2003 printing problem--printing 1 document on 2 pages | Excel Discussion (Misc queries) | |||
Printing problem in Excel | Excel Discussion (Misc queries) | |||
Printing Problem In Excel Due to Macro? | Excel Discussion (Misc queries) | |||
Excel printing problem | Excel Discussion (Misc queries) |