Compile Error: Named Argument not found

awesusan

New Member
Joined
Apr 17, 2019
Messages
1
Hello,

My colleague has recorded a macro which works for 2 of our team.
However when others try to use it they get a "Compile Error: Named Argument not found".

I have done some research and I think I understand what a Named Argument is, but I don't understand how its created or why it works for some and not others.
Here is a section of the code, I have highlighted in blue the section that is highlighted when the error appears:

Range("C6").Select
Cells.Replace What:="Student ", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False, FormulaVersion:=xlReplaceFormula2
Cells.Replace What:=" has clash:", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False, FormulaVersion:=xlReplaceFormula2

To use the macro file, it is saved in a shared folder and then individuals copy the file to their desktop before using.

Any advice would be very much appreciated, thank you!
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
The problem is caused by your site having different versions of Excel on different computers. The "FormulaVersion" named argument is a recent addition, so older versions of Excel will complain. Delete everything on the line from the comma in front of "FormulaVersion" to the end of the line.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,239
Members
452,621
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top