Results 1 to 3 of 3

Thread: Multiple textbox problem

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 1999
    Posts
    34

    Post

    Hi i'm trying to create a conversion program for use at work. I have eight text boxes for various linear measurements. If I type in 10 in the inches text box, and then click on the calculate button I want the other seven text boxes to give the figure in their respective outputs e.g. millimeters, yards etc. What I want to know is how will the program know which text box to base the calculations on.

    thanks in advance
    MICK

  2. #2
    Lively Member
    Join Date
    Jan 2000
    Location
    Springfield, IL
    Posts
    124

    Post

    You can use a Select Case like this

    Code:
    Private Sub Command1_Click()
    
        Select Case True
            Case Text1.Text <> ""   ' Data entered in Text1
                ' Code to convert data
            Case Text2.Text <> ""   ' Data entered in Text2
                ' Code to convert data
            Case Else   ' No data entered
        End Select
    
    End Sub

    [This message has been edited by bsmith (edited 01-31-2000).]

  3. #3
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    ma,usa
    Posts
    485

    Post

    You might try to use the got focus event or textbox change event to trigger the results in the other text boxes. I hope this is what you meant.

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