View Single Post
Old 12-18-2003, 09:46 AM   #14 (permalink)
Thraxian
Registered User
 
Join Date: Aug 2003
Location: NC, USA
Posts: 1
Thraxian is on a distinguished road
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.
Thraxian is offline   Reply With Quote