PDA

Click to See Complete Forum and Search --> : The Wild Thing


stjepan
Oct 11th, 2000, 09:41 AM
How I can retrieve the character number in a RichTextBox, but not to calculate the 'SPACE' character ?
... and with 'SPACE' character ?

Oct 11th, 2000, 02:32 PM
So you want to retrieve the number of characters in a RichTextBox w/wo/ space?

Private Sub Command1_Click()
Dim wspace As String
Dim wospace As String
wspace = Len(RichTextBox1.Text) 'get num with space
wospace = RichTextBox1.Text 'wospace = Text
wospace = Replace(wospace, Chr(32), "") 'replace space with ""
wospace = Len(wospace) 'get num without space
Debug.Print wspace; wospace 'returns text w/wo/ space
End Sub