Compile error Wrong number of arguments or invalid property assignment

Giordano Bruno

Well-known Member
Joined
Jan 7, 2007
Messages
1,341
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

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
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,214,592
Messages
6,120,433
Members
448,961
Latest member
nzskater

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