This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Wrong number of arguments or property assignment not valid
- 8 contributors
An assignment has been attempted that is not valid.
To correct this error
Check that the number of arguments you have supplied matches the number required by the target.
Check the property assignment.
- Assignment Operators
Additional resources
Excel Top Contributors: HansV MVP - Andreas Killer - Ashish Mathur - Jim_ Gordon - Jeovany CV ✅
November 12, 2024
Excel Top Contributors:
HansV MVP - Andreas Killer - Ashish Mathur - Jim_ Gordon - Jeovany CV ✅
- Search the community and support articles
- Microsoft 365 and Office
- Search Community member
Ask a new question
Wrong number of arguments or invalid property assignment error
With ws .Select tlRow = .Cells(Rows.Count, "A").End(xlUp).Row Rows("42:42").Select Selection.RowHeight = 35 '------------------------------------------------------------------------------------- .Range(rwHgt12_47 & ":" & rwHgt12_47, rwHgt12_48 & ":" & rwHgt12_48, rwHgt12_50 & ":" & rwHgt12_50, rwHgt12_51 & ":" & rwHgt12_51, rwHgt12_55 & ":" & rwHgt12_55, rwHgt12_56 & ":" & rwHgt12_56).Select .Range("A" & rwHgt12_56).Activate Selection.RowHeight = 12
I am getting the above error message on the highlighted line and I can;'t figure out what the issue is or how to fix it.
Report abuse
Reported content has been submitted
A Range object may take either one or two parameters, You need to use Application.Union to create a range with multiple areas.
Dim RR As Range Set RR = Application.Union( _ Range(rwHgt12_47 & ":" & rwHgt12_47), _ Range(rwHgt12_48 & ":" & rwHgt12_48), _ Range(rwHgt12_50 & ":" & rwHgt12_50), _ Range(rwHgt12_51 & ":" & rwHgt12_51), _ Range(rwHgt12_55 & ":" & rwHgt12_55), _ Range(rwHgt12_56 & ":" & rwHgt12_56)) RR.Select
1 person found this reply helpful
Was this reply helpful? Yes No
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
Thanks for your feedback.
Replies (2)
Question info.
- Other/unknown
- Office 2010
- Norsk Bokmål
- Ελληνικά
- Русский
- עברית
- العربية
- ไทย
- 한국어
- 中文(简体)
- 中文(繁體)
- 日本語
IMAGES
VIDEO