Function Count(ByVal txt As String, ByVal chax As String) As Integer Dim ret As Integer = 0 For Each ltr As Char In txt If ltr = chax Then ret += 1 End If Next Return ret End Function
MsgBox(TextBox1.Text.Split(",").Count - 1)