我对一些 html 标签进行了查找和替换,还用换行符替换了管道。我需要用 Chr13 替换管道,然后用 Chr10 替换 Chr13 作为后续步骤 - 下面是我拥有的 VBA,但它带来了“编译错误:语法错误”。任何人都可以通过下面显示的代码告诉我这个问题:
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace 内容:="—", Replacement:="-", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace 内容:="", Replacement:="", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace 内容:="", Replacement:="", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace 内容:="", Replacement:="", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False,SearchFormat:=False,_ ReplaceFormat:=False Selection.Replace What:=">",Replacement:="",LookAt:=xlPart,_ SearchOrder:=xlByRows,MatchCase:=False,SearchFormat:=False,_ ReplaceFormat:=False Selection.Replace What:="<",Replacement:="",LookAt:=xlPart,_ SearchOrder:=xlByRows,MatchCase:=False,SearchFormat:=False,_ ReplaceFormat:=False Selection.Replace What:=";",Replacement:="",LookAt:=xlPart,_ SearchOrder:=xlByRows,MatchCase:=False,SearchFormat:=False,_ ReplaceFormat:=False 单元格.替换内容:=“|”,替换:=“”&Chr(13)&“”,查找:=xlPart,搜索顺序:=xlByRows,MatchCase:=False,搜索格式:=False,ReplaceFormat:=False ReplaceFormat:=False 单元格.替换内容:=“Chr(13)”,替换:=“”&Chr(10)&“”,查找:=xlPart,搜索顺序 _ :=xlByRows,MatchCase:=False,搜索格式:=False,ReplaceFormat:=False
答案1
你缺少了逗号前ReplaceFormat:=False