|
-
Nov 2nd, 1999, 11:01 PM
#1
Thread Starter
Junior Member
Does anyone know how to print contents of a ListBox control?
Please, help.
Thanks,
Olga
-
Nov 2nd, 1999, 11:16 PM
#2
Something along the lines of this should work for you:
Code:
Dim I As Integer
For I = 0 To List1.ListCount - 1
Printer.Print List1.List(I)
Next
Printer.EndDoc
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]
-
Nov 2nd, 1999, 11:24 PM
#3
Thread Starter
Junior Member
Thanks, Aaron!
Worked like a charm!
Olga.
-
Nov 2nd, 1999, 11:24 PM
#4
Lively Member
Option Explicit
Dim i As Integer
Private Sub cmdPrint_Click()
For i = 0 To 9
List1.ListIndex = i
'Debug.Print List1 'Prints in the immediate window
Print List1 'Prints on the form
'Printer.Print List1 'Prints on my laser, Assume no more than one page
Next
Printer.EndDoc
End Sub
Private Sub Form_Load()
For i = 1 To 10
List1.AddItem (i)
Next
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|