LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Error Trap


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error Trap TEB2 Excel Programming 2 March 15th 05 05:34 PM
Error Trap Not Working Otto Moehrbach[_6_] Excel Programming 7 April 13th 04 12:15 PM
Trap a DateValue Error Otto Moehrbach[_6_] Excel Programming 2 February 12th 04 04:51 PM
error trap Rhonda[_3_] Excel Programming 2 October 22nd 03 07:07 PM


All times are GMT +1. The time now is 03:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"