how can I use two txtbox to enter aphanumeric value and change it

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cipher2079
    New Member
    • Jul 2006
    • 12

    #16
    Originally posted by willakawill
    This includes a check for numeric entries
    Code:
        Dim stAr(10) As String
        Dim arInput As Variant
        Dim stOutput As String
        Dim intLoop As Integer
        
        stOutput = ""
    
        stAr(0) = "zero"
        stAr(1) = "one"
        stAr(2) = "two"
        stAr(3) = "three"
        stAr(4) = "four"
        stAr(5) = "five"
        stAr(6) = "six"
        stAr(7) = "seven"
        stAr(8) = "eight"
        stAr(9) = "nine"
        stAr(10) = "ten"
        
        arInput = Split(Me.txtInput.Text, ",")
        For intLoop = 0 To UBound(arInput) - 1
            If IsNumeric(arInput(intLoop) Then
                stOutput = stOutput & stAr(CInt(arInput(intLoop))) & ", "
            Else
                MsgBox "Please enter single numbers separated by a comma"
                Me.txtInput.Text = ""
                Me.txtInput.SetFocus
                Exit Sub
            End If
        Next intLoop
        stOutput = stOutput & stAr(CInt(arInput(intLoop)))
        Me.txtOutput.Text = stOutput
    ok it does work however I was hoping to enter a words/letters and numbers without commans and convert the numbers from numeric to the actual world.

    ex.

    txtInput: hello123

    click button

    txtOutput: helloonetwothre e

    and if you don't mind can you then try and reverse it

    txtInput: OneTwoThreehell o

    Comment

    • cipher2079
      New Member
      • Jul 2006
      • 12

      #17
      Originally posted by cipher2079
      ok it does work however I was hoping to enter a words/letters and numbers without commans and convert the numbers from numeric to the actual world.

      ex.

      txtInput: hello123

      click button

      txtOutput: helloonetwothre e

      and if you don't mind can you then try and reverse it

      txtInput: OneTwoThreehell o

      sorry I mean txtOutput: OneTwoThreehell o

      Comment

      • willakawill
        Top Contributor
        • Oct 2006
        • 1646

        #18
        Originally posted by cipher2079
        ok it does work however I was hoping to enter a words/letters and numbers without commans and convert the numbers from numeric to the actual world.

        ex.

        txtInput: hello123

        click button

        txtOutput: helloonetwothre e

        and if you don't mind can you then try and reverse it

        txtInput: OneTwoThreehell o
        Great so you now have a working model that you can improve upon and learn from. Happy hunting :)

        Comment

        • cipher2079
          New Member
          • Jul 2006
          • 12

          #19
          Originally posted by willakawill
          Great so you now have a working model that you can improve upon and learn from. Happy hunting :)
          Thanks for all your help. I appriciated

          Comment

          Working...