Solved

printing text and selected items

Posted on 1998-06-10
3
179 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
KEWL earned 60 total points
ID: 1463051
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
ID: 1463052
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
ID: 1463053
shouldn't I be awarded some points
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

752 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