vba搜索当前sheet页是否有该字符串怎么写啊

如题所述

Sub dd()
Dim ss As Range
Set ss = ActiveSheet.Cells.Find(What:="要找的字符串", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, MatchByte:=False, SearchFormat:=False)
If ss Is Nothing Then
MsgBox "未找到"
Else
ss.Activate
MsgBox ss.Value
End If

End Sub
温馨提示:答案为网友推荐,仅供参考

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网