Solved

printing text and selected items

Posted on 1998-06-10
3
172 Views
Last Modified: 2010-05-18
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
Comment
Question by:440
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
KEWL earned 60 total points
Comment Utility
Create a Rich Text Box control, and use this code:

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

:)
all yours
0
 
LVL 1

Expert Comment

by:Edithf
Comment Utility
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
 
LVL 1

Expert Comment

by:Edithf
Comment Utility
shouldn't I be awarded some points
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now