'在字符串str1中查找字符串str2的出现个数
Public Function str_count(ByVal str1 As String, ByVal str2 As String) As Integer
Dim count As Integer
Dim start As Integer
Dim len_str2 As Integer
count = -1
start = 1
len_str2 = Len(str2)
Do
count = count + 1
start = InStr(start, str1, str2) + len_str2
Loop Until start = len_str2
str_count = count
End Function