Another VB Example:
Code:
Public Function LetterCount(Text As String, Letter As String) As Long
LetterCount = Len(Text) - Len(Replace$(Text, Letter, vbNullString))
End Function
As to the first post, it had errors in my VB environment. Split returns a string array, not a string. Also, Return is not valid in this context; instead, the result should be assigned to the function variable. Unless, this is VB.NET, in which case, the language was not clearly specified.