Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Ne-number on activeprinter

62 views
Skip to first unread message

Lars Thomsen Nielsen

unread,
Nov 15, 2002, 5:49:10 PM11/15/02
to
Excel2000: I have had the same problem as many other with the
Ne-number in the end of the active printer. The problem is that
the number changes from time to time and on the different PC's. I
have however found a solution to the problem, that I hope some of
you can use. It's a bit ugly, but it works ;-)

Best regard

Lars Thomsen Nielsen


Sub NeNumber()
Dim Tal As String
Printer = "\\NETWORK\TESTPRINTER"
On Error Resume Next
For i = 1 To 99
If i < 10 Then
Tal = "0" & i
Else
Tal = i
End If
Err.Number = 0
Application.ActivePrinter = Printer & " on Ne" & Tal & ":"
If Err.Number = 0 Then
MsgBox "Printer installed: " & Printer & " on Ne" & Tal & ":"
Exit For
End If
Next
End Sub

********************************************************
This emails is made by 100% recycled electrons
********************************************************

0 new messages