Home General VB/VBA Show Printer List
20 | 05 | 2012
This site has been updated and renewed. You have followed an old link.

Click here to go to the new site

http://www.visiblevisual.com/jupgrade

Show Printer List PDF Print E-mail
User Rating: / 1
PoorBest 
Tutorials
Written by Administrator   

Show printers is a msgbox

Show/Hidden vbnet code

View source
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
 
 

 

Comments   

 
0 #2 Guest 2011-07-31 19:00
:lol:
Quote
 
 
0 #1 Guest 2011-07-31 19:00
8) :sad: :cry: :o :roll: :P :P :P :P :zzz :eek: :-x :-? :o :cry: :sad: :oops: :oops: :-| :-| ;-) :-) :lol: :D
Quote
 

Add comment


Security code
Refresh

This site has been updated and renewed. You have followed an old link.

Click here to go to the new site

http://www.visiblevisual.com/jupgrade