|
-
September 15th, 2001, 10:57 AM
#1
Counting vowels in text box
Can I count the vowels in a text box or in a file.
-
September 16th, 2001, 04:10 PM
#2
Re: Counting vowels in text box
You must create your own functions that will receive as parameters a String and return a integer
private function VowelCount(Word as string) as Integer
'some code
...
end function
'into another function
Dim NumberOfVowel as integer
Dim WordToCheck as string
WordToCheck = "word to check"
NumberOfVowel = VowelCount(WordToCheck)
There is no functions that make that in VB6
-
September 16th, 2001, 04:34 PM
#3
Re: Counting vowels in text box
private Function VowelCount(strText as string) as long
dim T as Long
dim VC as long
for T = 1 to len(strText)
Select Case UCase(mid(strText,T,1))
Case "A","E","U","I","O"
VC = VC + 1
End Select
next T
VowelCount = VC
End Function
Tom Cannaerts
[email protected]
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
-
September 18th, 2001, 06:34 AM
#4
Re: Counting vowels in text box
How do I create my own Functions Please note I am a biginer
dar1
-
September 18th, 2001, 06:35 AM
#5
Re: Counting vowels in text box
How do I create my own Functions Please note I am a biginner
dar1
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|