|
-
How to Display Multiple lines in a Label or Text Box
This is my first time submitting a question. I’m quite new to Visual Basic programming. I’m using VB 6.0 Leaning Edition. I’m trying to write a number-adding program to use in a very specific area of my work. I have been successful in writing the program; i.e. it does what I want it to do. However, the question I have is this: Is it possible to display MULTIPLE lines of data, generated by my program, in a Label Box or Text Box? I know that a Text Box can ACCEPT multiple lines of inputted data if the Text Box property is set to multi line, but can it also display multiple lines of data generated by my program? If it’s possible to do this in either a Label Box or Text Box I’d really appreciate an example of the code required? Below is the code that I have written to generate the kind of data I show at the bottom of this question:
Private Sub Form_Load()
Do
Add = InputBox("TYPE A NUMBER; TO END TYPE: '0'")
If Add = 0 Then GoTo 4
total = total + Val(Add)
count = count + 1
Print "Number "; coun, Add, "Total "; total
4 Loop Until Add = 0
Print tab(50); “Total “;total
Print tab(50); “Average “;total / count
End Sub
I currently am having the data displayed on the Form (if the AutoRedraw property is set to True). I’d like to be able to print the displayed data, but I don’t want to have to print the form to do it. It would be easier to print it from a Label Box or Text Box. Below is an example of the data that is displayed on the Form:
Number 1 12 12
Number 2 45 57
Number 3 87 144
Number 4 678 822
Etc…
Etc…
Total 822
Average 205.5
If anyone can help with this problem I’d sure appreciate it. Thank you in advance to whom ever of you out there can help.
Sincerely,
Urbaud
Similar Threads
-
Replies: 1
Last Post: 11-08-2005, 08:42 AM
-
By Spumbu1977 in forum VB Classic
Replies: 1
Last Post: 10-15-2005, 12:17 PM
-
By Steve in forum ASP.NET
Replies: 0
Last Post: 07-29-2002, 06:25 PM
-
By Jason Hall in forum ASP.NET
Replies: 0
Last Post: 10-29-2001, 12:56 PM
-
By Mohamed Abu Zur in forum Java
Replies: 1
Last Post: 09-29-2000, 11:41 AM
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
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks