by Brandon (46 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 6th December 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Prints all items in combo listbox control.
'create file menu in the menu handler or use your
'own control and enter the following code, remember
'to use appopriate control names if you choose to
'modify them.
Private Sub Form_Load()
'populate combo box
With Combo1
.AddItem "Apples"
.AddItem "Peaches"
.AddItem "Pears"
.AddItem "Oranges"
.AddItem "Grapes"
.AddItem "Bananas"
End With
End Sub
Private Sub mnuFilePrint_Click()
'print all items in combox box
Dim PrintItem As Integer
For PrintItem = 0 To Combo1.ListCount
Printer.Print Combo1.List(PrintItem)
Printer.Print 'print blank space
Next
Printer.EndDoc 'stop printing
End Sub