Dim str As String Dim n As Integer str = "abbcccd" n = Len(str) - Len(Replace(str, "c", ""))本回答被网友采纳
第2个回答 2013-05-16
Private Sub Command1_Click() Dim s As Integer For i = 1 To Len(Text1) If Mid(Text1, i, Len(Text2)) = Text2 Then s = s + 1 End If Next Print s & "个" & Text2 End Sub