Hey guys,
InstalledPrinters is the combo box
I have this code on the mouse down for the combo box (got it off a google search):
Code:
Dim pr As Printer
For Each pr In Printers
Me.InstalledPrinters.AddItem pr.DeviceName
Next pr
Me.InstalledPrinters.Text = Printer.DeviceName
For the click event I tried (made this up myself):
Code:
Private Sub InstalledPrinters_Click()
Dim NewPrinter As String
NewPrinter = Me.InstalledPrinters
Set Application.Printer = Application.Printers(NewPrinter)
End Sub
And I have these on the form load/unload:
Code:
Private Sub Form_Load()
Dim DefaultPrinter As String
DefaultPrinter = Application.Printer.DeviceName
Me.SalesName = Me.SelectEmp.Column(1)
End Sub
Code:
Private Sub Form_Unload(Cancel As Integer)
Set Application.Printer = Application.Printers(DefaultPrinter)
End Sub
The combo box list code seems to work. But the click event code doesn't seem to do what its supposed to. Any thoughts on what I should do differently?