Results 1 to 2 of 2

Thread: formatting text

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2002
    Location
    CT
    Posts
    51

    Question formatting text

    I would like a simple way to verify that data has been entered as required in a text box. Specifically, I need the user to enter a number in the form #.## (for example, 2.59 or 3.41 and not .23 and not 2.5 and 6). I would also like to display the entered data in the same #.## form. So if the user enters 2.3, I can convert it and display it as 2.30.

    I believe there is a Format function that can be used with strings. Does anyone have any examples they could share?

    thanks..........BluesMatt

  2. #2
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171
    Something like this?

    VB Code:
    1. Private Sub Command1_Click()
    2. Text1.Text = Format$(Text1.Text, "0.00")
    3. End Sub


    Has someone helped you? Then you can Rate their helpful post.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width