Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
members on my network printer not able to print to default printer | Excel Discussion (Misc queries) | |||
How do I send a spreadsheet to a printer outside the network? | Excel Discussion (Misc queries) | |||
Skittish Ne0x address on network printer | Excel Programming | |||
selecting network printer | Excel Programming | |||
Network address not Local Address | Excel Programming |