I'm trying to get a number of character occurence in a string. It should work, but it doesn't.
Function countLetter(letter As String, secretWord As String)
MsgBox (Split(secretWord, letter).Length)
countLetter = Split(secretWord, letter).Length - 1
End Function
What is wrong here?