有人可以帮我更改此代码,以便在找到单词时还会显示该单词出现的次数?谢谢!
Sub findtext()
'
' findrobot Macro
' Will find the word robot
'
' Keyboard Shortcut: Ctrl+t
'
Dim found As Variant
Set found = Sheets("Email").Cells.find("robot", Sheets("Email").Cells(1, 1), xlValues, xlPart)
If (Not found Is Nothing) Then
'found
MsgBox "Words Found =" & found, vbOKOnly, "Found"
Else
'not found
MsgBox "Sorry the text was not found please try again. Macro stopping"
End If
End Sub