creating a matchcode

mhubbard

Registered User.
Local time
Today, 14:43
Joined
Jul 31, 2002
Messages
25
I am trying to create a match code for my Company field. What I am trying to do is make a match code of all characters in the company field except for Vowels. Any help would be greatly appreciated. Example. Company Name=’ABC INC’ Result would be ‘BCCNC’
Thanks
 
Try:

Public Function NoVowels(strOrigWord As String) As String

Dim strConversion As String
Dim i As Integer
For i = 1 To Len(strOrigWord)
tmp = LCase(Mid(strOrigWord, i, 1))
Select Case tmp
Case "a", "e", "i", "o", "u"
Case Else
strConversion = strConversion & Mid(strOrigWord, i, 1)
End Select
Next i
NoVowels = strConversion
End Function
 
Thanks Fornatian!!!
Worked like a charm. you are the best!
 

Users who are viewing this thread

Back
Top Bottom