24 | 05 | 2017

Show Printer List

Show printers is a msgbox

Public Function ShowPrinters()

On Error GoTo errHandler:
Dim l As Long
Dim lCount As Long
Dim liststr As String

liststr = ""

lCount = Printers.Count

If lCount = 0 Then
liststr = "(No Printer Installed)"
Else
For l = 0 To lCount - 1
liststr = liststr & vbCr & Printers(l).DeviceName
Next
End If

'Show all printers in a messagebox
MsgBox liststr, , "Printers"

Exit Function
errHandler:
End Function
Login

Sign up now and upload your code to the website.

Help us to continue.....
Statistics
Articles View Hits
2258995
Latest Articles