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

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
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,215,001
Messages
6,122,648
Members
449,092
Latest member
peppernaut

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