Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Not sure whether this could also be the problem at your place.............but I have been working with this solution for a while now. We had the problem of the network assigning different numbers to the network printers using Ne01, Ne02, Ne03 or Ne04. This macro will search the possibilities and always find the right one. It will then execute the print job and go back to the default printer Sub selectprntrandprintlbl() Dim oldpname As String Dim temppname As String oldpname = Application.ActivePrinter For j = 0 To 9 On Error Resume Next temppname = "Acrobat Distiller on Ne0" & j & ":" Application.ActivePrinter = temppname If Application.ActivePrinter = temppname Then Exit For End If Next j Application.ActivePrinter = "temppname" prntlbl 'prntlbl is the name of a macro Application.ActivePrinter = oldpname End Sub Hope that helps -- bill k ------------------------------------------------------------------------ bill k's Profile: http://www.excelforum.com/member.php...nfo&userid=821 View this thread: http://www.excelforum.com/showthread...hreadid=465632 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Error Trap | Excel Programming | |||
Error Trap Not Working | Excel Programming | |||
Trap a DateValue Error | Excel Programming | |||
error trap | Excel Programming |