尝试运行宏时出现以下错误:
Run-time error '1004':
Application-defined or object-defined error
这是宏:
Sub multiFindNReplace()
Dim myList, myRange
Set myList = Sheets("Receivable").Range("CN2:CO6") 'two column range where find/replace pairs are
Set myRange = Sheets("Receivable").Range("A2:BQ1000") 'range to be searched
For Each cel In myList.Columns(1).Cells
myRange.Replace What:=cel.Value, Replacement:=cel.Offset(0, 1).Value, _
LookAt:=xlWhole, MatchCase:=True, SearchFormat:=False, ReplaceFormat:=False
Next cel
End Sub
当我单击“调试”时,以黄色突出显示的 3 行是:
myRange.Replace What:=cel.Value, Replacement:=cel.Offset(0, 1).Value, LookAt:=xlWhole, _
MatchCase:=True, SearchFormat:=False, _
ReplaceFormat:=False
我能做些什么来解决这个问题?