dwaneos
asked on
Print to a selected printer in a cbo
Does anyone know how I can print to specific printer in a combobox. I want to be able to print a report to a printer which I have selected in the cbo. It's reading the list of printers installed on my computer fine, I just need the code to actually print to that printer.
Need it kinda fast too...
Option Explicit
Dim Pr As Printer
-----------------
Private Sub cmdOK_Click()
?????????????
End Sub
Private Sub Form_Load()
For Each Pr In Printers
cboPrinter.AddItem Pr.DeviceName
Next
End Sub
Need it kinda fast too...
Option Explicit
Dim Pr As Printer
-----------------
Private Sub cmdOK_Click()
?????????????
End Sub
Private Sub Form_Load()
For Each Pr In Printers
cboPrinter.AddItem Pr.DeviceName
Next
End Sub
Set Printer = Printers(n)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
oops... shouldn't be a "set" in that first statement after the declarations... simple assignment:
PrFoundName = Printer.DeviceName
sorry
Q
PrFoundName = Printer.DeviceName
sorry
Q