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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing A list Box

Status
Not open for further replies.

JeremyM

Programmer
Nov 10, 2000
33
US
I have a list box in report view and I need to print what is in the listviewbox.

Anyone know an easy way (or a way) to do this.

Thanks,
Jeremy
 
Private Sub Command1_Click()
Dim SEARCH As Integer
For SEARCH = 0 To List1.ListCount - 1
Debug.Print List1.List(SEARCH) '
Next SEARCH
End Sub

David Paulson


 
I mean that I need it to print to my printer.
 
Private Sub Command1_Click()
Dim SEARCH As Integer
For SEARCH = 0 To List1.ListCount - 1
Printer.Print List1.List(SEARCH) '
Next SEARCH
Printer.EndDoc
End Sub

David Paulson


 
I get an error when I use this. The error is:

Compile error
Method or data member not found


then when I click ok this is highlighted:

.ListCount


please help, I really need this
 
If you have a large listcount then it is a good idea to set visible=false whilst printing. This will speed things up.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top