?
Solved

Displaying lined up numbers on a form

Posted on 2003-03-13
8
Medium Priority
?
179 Views
Last Modified: 2010-05-01
I have to display several rows of information (numbers). I am using a loop to display the different rows. I have a problem lining up the numbers.
for example, this is the way I have it right now.
                     
                       1221    453    98356
                       579532    4322    54397
                       984    45787    99873          

The numbers do not follow a proportional order.
                       
This is the way I need it: All lined up

                       1221    453    98356
                       579532  4322   54397
                       984     45787  99873
         
Is there anyway of doing this? I have tried many ways, but I cannot get it. The program I am using, has about 8 different modules and for some reason it is not accepting the CurrentX ot CurrentY Function. Also, I tried the MSFlexGrid, but I could not get it to work in this program either. Thanks for your help.

0
Comment
Question by:caleno
[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
8 Comments
 
LVL 53

Expert Comment

by:Ryan Chong
ID: 8133366
Try display your info in a ListView.
0
 

Accepted Solution

by:
limva earned 80 total points
ID: 8133779
Try changing the font to courier.
0
 
LVL 3

Expert Comment

by:DocM
ID: 8133938
Here is an example using the TextWidth property.

Private Sub Command1_Click()

a = Array(1221, 453, 98356)
 
ThisLine = ""
For i = 0 To UBound(a)
 d = CStr(a(i))
 While TextWidth(d) < TextWidth("123456789")
  d = d & " "
 Wend
 ThisLine = ThisLine & d
 Text1.Text = Text1.Text & d
Next

Text1.Text = Text1.Text & vbCrLf
Picture1.Print ThisLine
 
End Sub

0
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.

 
LVL 3

Expert Comment

by:redfordb
ID: 8135378
Do you know the largest number that can be generated ?

If so use the FORMAT command ie

FORMAT(<NUMBER>,"#######")

This will padd the numbers so they are all the same length

0
 

Expert Comment

by:modulo
ID: 8504683
Dear caleno

Please check:
http://www.cityofangels.com/Experts/Closing.htm

modulo

Community Support Moderator
Experts Exchange
0
 

Expert Comment

by:CleanupPing
ID: 8900127
caleno:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 9692949
Moderator, my recommended disposition is:

    Accept limva's comment(s) as an answer.

DanRollins -- EE database cleanup volunteer
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
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…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month13 days, 23 hours left to enroll

801 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