Macros and VBA

Copper Contributor

My macros were all working fine then suddenly, any that have the word "range" in them whether in "If" statements or just selecting a range, now have this error which renders virtually all macros on this workbook useless. This happens on all sheets.

 

Here's an example:

Sub gotocheckbookfromcalendars()
Sheets("Checkbook").Visible = True
Sheets("Calendars").Visible = False
Sheets("Checkbook").Select
ActiveWindow.zoom = 125
range("Balance2020").Select
End Sub

 

The error occurs here at the word "range."

 

Using Excel 16.

 

Thanks,

Frank

4 Replies

@Frank Drucker 

What is the error message?

@Hans Vogelaar 

The error message reads:

 

"Compile Error Wrong number of arguments or invalid property assignment."

 

This now happens for every macro that has the word "Range" in it.

 

Thanks,

Frank

@Frank Drucker 

Have you created a procedure or function or module named range?

@Hans Vogelaar 

 

Yes!! Stupid of me not to realize this. Once I changed the name to "Stove" everything seems to work.

 

Thanks so much for your wisdom. I would have been pondering this for a long time.

Frank