添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

strSearch 是被查找的内容
strReplace 是替换的内容

Sub FindAndReplace(ByVal strSearch As String, ByVal strReplace As String)
    Cells.Replace What:=strSearch, Replacement:=strReplace, LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False
End Sub
Sub main()
     Call FindAndReplace("abcd", "ww")
End Sub