Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 186
  • Last Modified:

printing text and selected items

im working on a program that has 2 list boxes and a text box and a command button the first list box multiselect is set to extended i would like to know how to copy just the selected items from the first list box and add them to the second list box with the command button and would like to know how to print wordwraped text from the text box ive tryed printer.print text1.text but it only prints the first line off the page
0
440
Asked:
440
  • 2
1 Solution
 
KEWLCommented:
Create a Rich Text Box control, and use this code:

Richtext1.text = text1.text
richtext1.selprint
printer.enddoc

:)
all yours
0
 
EdithfCommented:
For your question on selecting items in te listbox do the following

    If List1.ListIndex <> -1 Then
        For i = 0 To List1.ListCount - 1
            If List1.Selected(i) Then List2.AddItem List1.List(i)
        Next i      
    End If

You should change the textbox properties (Set MultiLine to True) and then in do the  
        Printer.Print Text1.Text
        Printer.EndDoc

Hope that help :)

I was going to post it as an answer but someone is a bit earlier than me. Anyway....
0
 
EdithfCommented:
shouldn't I be awarded some points
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now