
CountFileCharacters – Counting how many characters of a given type are in a file
‘ Count how many characters of a given type are in a file’ Example:’ Dim charCount(255) As Integer’ CountFileCharacters(“c: est.txt”, charCount)’ Debug.WriteLine(“the char ‘A’ was found ” & charCount(Asc(“A”)) & ” times”)’ Debug.WriteLine(“the char ‘a’ was found ” & charCount(Asc(“a”)) & ” times”)Sub CountFileCharacters(ByVal filePath As String, ByVal charCount() As