nefistopoleez
Programmer
Hi,
This is my first thread, I'm a new guy...go easy on me!
I recorded a macro: pressed record, did a find and replace and stopped it. Now I run the same macro I just recorded and I get an error: "Compile error, named argument not found" and in the code editor it highlights "Activate:=True".
Here's the exact recorded code:
Sub Macro1()
Cells.Find What:="tweak colors", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, Activate:=True
ActiveCell.Replace What:="tweak colors", Replacement:="tweak colors more", _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False
Cells.Find What:="tweak colors", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, Activate:=True
End Sub
*** If I take out the Activate:=True then it runs without any errors, but it doesn't work...
Thanks!
ps - I'm using excel:mac v. x - perhaps that is my problem
This is my first thread, I'm a new guy...go easy on me!
I recorded a macro: pressed record, did a find and replace and stopped it. Now I run the same macro I just recorded and I get an error: "Compile error, named argument not found" and in the code editor it highlights "Activate:=True".
Here's the exact recorded code:
Sub Macro1()
Cells.Find What:="tweak colors", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, Activate:=True
ActiveCell.Replace What:="tweak colors", Replacement:="tweak colors more", _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False
Cells.Find What:="tweak colors", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, Activate:=True
End Sub
*** If I take out the Activate:=True then it runs without any errors, but it doesn't work...
Thanks!
ps - I'm using excel:mac v. x - perhaps that is my problem