ich habe einen gefüllten String (VBA) und möchte nun
wissen, wie oft ein bestimmtes Zeichen darin vorkommt.
Gibt es dafür einen Befehl?
Gruß,
Guido
--
Regards
Frank Kabel
Frankfurt, Germany
Sub AnzahlZeichen()
Const strText As String = "Der Affe frist Bananen"
Const strZeichen As String = "A"
MsgBox "Das """ & strZeichen & """ kommt " & Len(strText) - _
Len(Replace(strText, strZeichen, "")) & "x vor!"
End Sub
MfG Frank
_____________________________________________
Frank Arendt-Theilen, Microsoft MVP für Excel, Hameln
Website: http://www.xl-faq.de; Auftragsprogrammierung