Can I count the vowels in a text box or in a file.
Printable View
Can I count the vowels in a text box or in a file.
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
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
How do I create my own Functions Please note I am a biginer
dar1
How do I create my own Functions Please note I am a biginner
dar1