Переписано, проверено и работает!Вставьте это в верхней части модуля
Function REMOVEVOWELS(Txt) As String
'Removes all vowels from the Txt argument
Dim i As Long
For i = 1 To Len(Txt)
If Mid(Txt, i, 1) Like "[AEIOU]" Then
Txt = Replace(Txt, Mid(Txt, i, 1), "")
End If
Next i
REMOVEVOWELS = Txt
End Function
РЕДАКТИРОВАТЬ
Более элегантное решение.
Function REMOVEVOWELS(Txt) As String
'Removes all vowels from the Txt argument
Vowels = Array("A", "E", "I", "O", "U")
For Each a In Vowels
Txt = Replace(Txt, a, "")
Next a
REMOVEVOWELS = Txt
End Function