Results 1 to 3 of 3

Thread: Need some help here (yes to much to explain in the title)

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 1999
    Location
    Bergen, Norway
    Posts
    143

    Post

    hi.

    I have a problem I can't solve.
    Im trying to get a program to recognize text in a text box.

    for example:
    if a user types in:help in the text1 text box the text2 text box will display help information. (this is somewhat easy

    but I also want the program to recognize cammands from text2 text box like if the text2 textbox displays help it will display the help thing in text2. (I find this difficult)
    Confused ?

    the problem is realy to recognize the things in text2 and then execute the commands.
    it must scann the whole line of text that is written.

    like if a user types. "I need help"
    the help thing activates again.

    It would also be nice if someone know how to make the program check with a text file to see if the users username is written there or not. if the username isthere then execute command, if not then do nothing. (I also have major problems with this

    Hope you understand what my problem is.

    Thanks in advance.


    -Lumin

  2. #2

    Post

    Hi !

    I'm not sure if I understand this.

    Try this:

    Sub Text1_Change()

    Select Case UCase$(Text1.Text)
    case "I NEED HELP"
    Text2.Text = "You'll get your help..."

    case "I NEED MORE"
    Text2.Text = "You'll get more..."

    End Select


    End Sub

    ------------------
    EMAIL: [email protected]

    PAGE: <A HREF="http://members.xoom.com/sharetools
    " TARGET=_blank>http://members.xoom.com/sharetools
    </A>

  3. #3
    Guest

    Post

    If you just want to check specific words, use the InStr function.
    InStr Function

    Returns a Variant (Long) specifying the position of the first occurrence of one string within another.

    Syntax

    InStr([start, ]string1, string2[, compare])

    The InStr function syntax has thesearguments:

    start: Optional.Numeric expression that sets the starting position for each search. If omitted, search begins at the first character position. If start contains Null, an error occurs. The start argument is required if compare is specified.

    string1: Required.String expression being searched.

    string2: Required. String expression sought.

    compare: Optional. Specifies the type ofstring comparison. If compare is Null, an error occurs. If compare is omitted, the Option Compare setting determines the type of comparison.
    ------------------

    Vincent van den Braken
    EMail: [email protected]
    ICQ: 15440110
    Homepage: http://www.azzmodan.demon.nl





    [This message has been edited by Azzmodan (edited 01-03-2000).]

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