Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB newbe with Printing problem 1

Status
Not open for further replies.

obliviux

Programmer
Jun 2, 2000
38
US
I want to be able to call a menu to select which printer to use from VB.&nbsp;&nbsp;<br><br>The help says to use the command:&nbsp;&nbsp;Set Printer = Printers(n)<br>but I cannot get it to do anything. It runs with no effect.<br>What am I overlooking?<br><br>thanks,<br><br><br>Jeremy
 
I tried this with a drop down list box and it works fine with me<br><br>Private Sub Form_Load()<br><br>Dim MyPrn As Printer<br><br>For Each MyPrn In Printers<br>&nbsp;&nbsp;&nbsp;&nbsp;cboPrinter.AddItem MyPrn.DeviceName<br>Next MyPrn<br><br>End Sub<br><br>Private Sub cmdSet_Click()<br>Set Printer = Printers(cboPrinter.ListIndex)<br>End Sub<br><br>You can modify the code accordingly for the menu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top