Results 1 to 4 of 4

Thread: Howto turn (string) text into Integer value......?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2000
    Posts
    84
    I remember reading about a VB command that turned a text value into an integer value.... but, I'm having trouble fining the command....


    Dim MyString as String
    Dim MyInteger as Integer

    If MyString = "10" and I want to load MyInteger with Mystring....
    (MyInteger = 10)


    How would I do that.....?

    thanks!

  2. #2
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    from a text box it would be
    myString = Val(text1)
    from a string assuming myVal = "10"
    myVal = CInt(myString) ' = 10
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  3. #3
    Fanatic Member HaxSoft's Avatar
    Join Date
    May 2000
    Location
    Ohio
    Posts
    593
    Code:
    MyInt = CInt(MyStr)
    or perhaps:

    Code:
    MyInt = Val(MyStr)

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Oct 2000
    Posts
    84
    Thank you

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