Results 1 to 3 of 3

Thread: RichTextBox Length is weird

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2001
    Posts
    162

    RichTextBox Length is weird

    I am using a rich text box and then loading a text file and counting the number of charcters. I get numbers that aren't right, even when i only have 1 letter it says 101 as the length

    anyone know how to get the length of all the text from a richtextbox?

    i used len(richtextbox1) but they failed

    thanks in advance

  2. #2
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    I think this should work:

    VB Code:
    1. len(RichTextBox1.Text)

  3. #3
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431
    len(richtextbox1) won't work the way you expected it to because the Text property is not the default property of the richtextbox as it is for a textbox. If you want to see why you got that "strange" result, do MsgBox richtextbox1.

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