Results 1 to 6 of 6

Thread: Count textboxes caption (RESOLVED)

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Location
    England
    Posts
    242

    Count textboxes caption (RESOLVED)

    how would i get how many characters (including spaces and other special characters) are in a textbox? what i want to do is, when the user types something its gets how many characters are added and take the total number away from 40 (becuase the maxlength is 40 and im making a counter for how many characters are left)
    Last edited by lpeek; May 19th, 2003 at 11:38 AM.
    Lpeek

  2. #2
    Frenzied Member McGenius's Avatar
    Join Date
    Jan 2003
    Posts
    1,199
    Use Len function: MyCount = Len(Text1.Text)
    McGenius

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Location
    England
    Posts
    242
    Originally posted by McGenius
    Use Len function: MyCount = Len(Text1.Text)
    how would i use that? it keeps saying "expected ("
    is this right:
    VB Code:
    1. Private Sub txtbugname_Change()
    2.     Use Len function: lblbnc.Caption = Len(txtbugname.Text)
    3. End Sub
    Lpeek

  4. #4
    Junior Member Armor-Of-God's Avatar
    Join Date
    Apr 2003
    Location
    Panic In Detroit
    Posts
    30
    Use len function: is not part of the code.

    Code:
    lblbnc.Caption = Len(txtbugname.Text)
    Our Way To Fall

  5. #5
    Frenzied Member McGenius's Avatar
    Join Date
    Jan 2003
    Posts
    1,199
    Originally posted by lpeek
    how would i use that? it keeps saying "expected ("
    is this right...
    All I can tell you is that you need to learn to differ between ordinary text and and actual code snippet.
    McGenius

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Location
    England
    Posts
    242

    thanks

    oops, i c now (did notice the ":" thought it was all one =P), thanks
    Lpeek

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