Compile error Wrong number of arguments or invalid property assignment

Giordano Bruno

Well-known Member
Joined
Jan 7, 2007
Messages
1,352
I have recently found that a number of macros which used to work are now failing with the above message. It happens on my desktop computer, but not on my Surface Pro. The simplest test is to open a workbook, set the cursor in the top left corner and start to record a macro. I hold the shift key and press the down arrow and then stop recording. The recorded code is "Range("A1:A2").Select" Not brilliant code, but it works on my Surface Pro. When I try to run this code on my Desk top computer I get the Compile error message. It can be fixed by typing "ActiveSheet." before the word "Range". Neither the error message, not the Help option seem to refer to the situation. Can anyone tell me why this problem occurs on my desktop computer and what can be done to fix this issue?
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Have you run a repair of Office on the problem machine?
 
Upvote 0
Hi Rory, Thanks for the suggestion. Yes, I've run both the slow version and the fast version and also reinstalled office 365.
 
Upvote 0

Forum statistics

Threads
1,223,705
Messages
6,173,985
Members
452,540
Latest member
haasro02

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