VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Prints all items in combo listbox control.

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.

Rate 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




Download this snippet    Add to My Saved Code

Prints all items in combo listbox control. Comments

No comments have been posted about Prints all items in combo listbox control.. Why not be the first to post a comment about Prints all items in combo listbox control..

Post your comment

Subject:
Message:
0/1000 characters