| | |
Word Count Help !!
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
Hi,
Sorry, Little bit of Modification in my previous post :
Just Change For Loop this way :
Regards
Veena
Sorry, Little bit of Modification in my previous post :
Just Change For Loop this way :
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
For i = 10 To 2 Step -1 MyStr = Replace(MyStr, Space(i), Space(1)) Next MyCntArray = Split(MyStr, " ") MsgBox UBound(MyCntArray)
Regards
Veena
•
•
•
•
Hi,
Sorry, Little bit of Modification in my previous post :
Just Change For Loop this way :
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
For i = 10 To 2 Step -1 MyStr = Replace(MyStr, Space(i), Space(1)) Next MyCntArray = Split(MyStr, " ") MsgBox UBound(MyCntArray)
Regards
Veena
Don't you? :-|
Try this with your code "Hello world" and please post how many words your program find.
Hi
This is My Complete. Code.
I hope at least now, it is Clear.
Regards
Veena
This is My Complete. Code.
Private Sub CmdCount_Click()
Dim MyCntArray
Dim MyStr As String
Dim i As Integer
'
MyStr = TextBox1.Text
'
For i = 10 To 2 Step -1
MyStr = Replace(MyStr, Space(i), Space(1))
Next
' Replace All the multiple Spaces with single spaces
' here i have given for max 10 spaces,
' u can change it to a higher value
'
MyCntArray = Split(MyStr, " ")
MsgBox "Number Of Words : " & UBound(MyCntArray)
'
End SubI hope at least now, it is Clear.
Regards
Veena
•
•
•
•
perhaps you have an answer for reading the total characters in a text box
and a way of limiting the number.
I've spent 93 mins so far and can not find a suitable answer.
Regards
Arty
This gives you length of Characters in the TextBox..
MsgBox Len(Text1.Text)
You can Limit the TextBox Setting its MaxLength
Text1.maxLength =10
Regards
Veena
![]() |
Similar Threads
- word count (C++)
- Word count help. (C++)
- Can you please help me write this word count program in another way (Python)
- I Need Help Writing A Word Count Program In My Python (Python)
- Need Help, basic word count, string manipulation (VB.NET)
- word count in borland c++ ?? (C++)
- word count (Java)
- I can't implement a word count into my text editor (JAVA) (Java)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Saving Excel Worksheet
- Next Thread: Questions Unsolvable
Views: 7688 | Replies: 22
| Thread Tools | Search this Thread |
Tag cloud for Visual Basic 4 / 5 / 6
* 6 429 2007 access activex add age append application basic beginner birth bmp c++ calculator cd cells.find click client code college column component connection copy creat ctrl+f data database datareport date delete dissertations dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver struct subroutine table tags textbox time timer urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





