Howdy,
I would like to use one of the functions such as len,mid,instr to find out the exact number of specific letters in a string.
lets say the string is "Hello, take me to your leader".
and I want to find out how many of the letters "h","t" and "a" that are in this string.
the code I tryed to use is this.

Dim M As Integer
M = 1
For M = 1 To Len(textString)
If Mid(letters, M, 1) = "h" or "t" or "a" Then
intnumletters = intnumletters + 1
End If
Next M
NumOfMyletters = intnumletters

but this gives me a type mismatch error.
if I only try to use one letter(say "h") then it works fine but when I use Or it no longer works.
any help or suggestion would be great.
thank you