Results 1 to 2 of 2

Thread: Detecting letters in a text box???

  1. #1

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

    Post

    Hi,

    I would like to know how to detect what letter is 5 spaces across in a label. For example, in a label called lblLetters with a caption of ‘Visual Basic’ the result would be ‘l’. It would find ‘L’ because ‘L’ is five spaces to the right from the start of the word.

    Thanks

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    You can use Mid function.


    Dim strText As String

    strText = "This is my test"

    MsgBox Mid(strText, 4, 1)


    Second parameter for the Mid function is the Start position (in this case it's 4) and the second parameter is the length (in this case 1 (1 character)

    Regards,

    ------------------

    Serge

    Software Developer
    [email protected]
    [email protected]
    ICQ#: 51055819


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