Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

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

Displaying lined up numbers on a form

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
caleno
Asked:
caleno
1 Solution
 
Ryan ChongCommented:
Try display your info in a ListView.
0
 
limvaCommented:
Try changing the font to courier.
0
 
DocMCommented:
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
redfordbCommented:
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
 
moduloCommented:
Dear caleno

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

modulo

Community Support Moderator
Experts Exchange
0
 
CleanupPingCommented:
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
 
DanRollinsCommented:
Moderator, my recommended disposition is:

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

DanRollins -- EE database cleanup volunteer
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

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