Results 1 to 3 of 3

Thread: [Solved] Mid() Problem

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2007
    Posts
    12

    [Solved] Mid() Problem

    For some unknown reason I can't get the Mid() function working properly. I'm just trying to read each character, one by one, from a textbox but it's not working. Here's what I have:

    vb Code:
    1. For i = 0 To (Len(Text1.Text) - 1)
    2.     MsgBox (Mid$(Text1.Text, i, 1))
    3. Next i

    I get the error "Invalid Procedure Call or Argument" when I try to run it. Any ideas?
    Last edited by pushad; Apr 24th, 2010 at 09:32 PM.

  2. #2
    VB For Fun Edgemeal's Avatar
    Join Date
    Sep 2006
    Location
    WindowFromPoint
    Posts
    4,255

    Re: Mid() Problem

    Code:
    For i = 1 To Len(Text1.Text)
        MsgBox Mid$(Text1.Text, i, 1)
    Next i

  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 2007
    Posts
    12

    Re: Mid() Problem

    Quote Originally Posted by Edgemeal View Post
    Code:
    For i = 1 To Len(Text1.Text)
        MsgBox Mid$(Text1.Text, i, 1)
    Next i
    *facedesk*

    Thanks

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