Results 1 to 3 of 3

Thread: Does not matter if you type the name in higher case or lower case!

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 1999
    Location
    Leeds, UK
    Posts
    287

    Post

    Hi,

    I want to type my name as richard, RICHARD, RiChArD etc... and still continue.
    At the moment I use the code..

    if txtInput.text = "Richard" or txtInput = "richard" or txtInput = "RiChArD" etc...

    is there an easy way of doing this or do I have to cover every possible way of typing the name???

    Thanks

  2. #2
    New Member
    Join Date
    Sep 1999
    Posts
    7

    Post

    You can use either the upper or lower case formatting functions:

    IF LCASE(txtInput.text) = "richard" then...

    or use:

    IF UCASE(txtInput.text) = "RICHARD" then...

  3. #3
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892

    Post

    An easier way is to put Option Compare Text at the first line of code.
    Then, Richard = rICHARD = RicHarD = etc.

    ------------------
    Yonatan
    Teenage Programmer
    E-Mail: [email protected]
    ICQ: 19552879



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