LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Skittish Ne0x address on network printer


Tom, altho I still don't know what *Err.Number* & *Err.Clear* is all
about, I made your script work as follows:

Dim i As Long, xUNC As String, rUNC As String
On Error Resume Next
For i = 0 To 9
xUNC = "\\123.123.123.123\(103) LM T632 on Ne0" & i & ":"
Application.ActivePrinter = xUNC
If Err.Number = 0 Then 'if UNC is valid, print
ActiveWindow.SelectedSheets.PrintOut Copies:=1,
ActivePrinter:= _
xUNC, Collate:=True 'Print this sheet @ Supply
rUNC = xUNC 'in case you want to store & reuse the
printer's UNC later on
MsgBox ("And this little piggy went to " & xUNC & " @
Supply")
Else
Err.Clear
End If
Next
On Error GoTo 0

Again, thanks for pointing me in the right direction :)


--
AH·C
------------------------------------------------------------------------
AH·C's Profile: http://www.excelforum.com/member.php...o&userid=29108
View this thread: http://www.excelforum.com/showthread...hreadid=490684

 
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
members on my network printer not able to print to default printer smeheut Excel Discussion (Misc queries) 0 June 18th 07 06:42 PM
How do I send a spreadsheet to a printer outside the network? Moe in Goffstown Excel Discussion (Misc queries) 3 February 14th 07 04:34 PM
Skittish Ne0x address on network printer AH·C[_7_] Excel Programming 0 December 5th 05 08:36 AM
selecting network printer Bill Kuunders Excel Programming 0 January 11th 05 08:22 PM
Network address not Local Address ianripping[_78_] Excel Programming 1 July 19th 04 10:17 PM


All times are GMT +1. The time now is 04:30 PM.

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"