PDA

View Full Version : Solved: user form



CCkfm2000
10-31-2006, 06:52 AM
hi all..

what i need is some info on how to get the active printer name to be displayed on a user form.

currently i've got this far

Private Sub Label2_Click()
Label2 = Application.ActivePrinter
End Sub

i need this to be updated when the user form is displayed.

thanks

lucas
10-31-2006, 07:28 AM
This uses a funtion from one of Malcolm's KB entries. You will have to change the printer name between the "" in the userform initialize statement to reflect your printer.
see attached:

lucas
10-31-2006, 07:32 AM
This works for Activeprinter....sorry I missed it the first time.

Private Sub UserForm_initialize()
Printer = Application.ActivePrinter
Label1.Caption = Printer
End Sub


and it looks like you don't need the funtion....sorry for the confusion I was in a bit of a hurry.

CCkfm2000
10-31-2006, 07:41 AM
thats done the trick.

thanks lucas