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

invalid property assignment vbscript

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​

Chip Pearson

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

  1. runtime error

    invalid property assignment vbscript

  2. How to fix Error 450 (Wrong number of arguments or invalid property

    invalid property assignment vbscript

  3. Object doesn't support this property or method

    invalid property assignment vbscript

  4. Wrong number of arguments or invalid property assignment error message

    invalid property assignment vbscript

  5. iBrowse Error "Wrong number of arguments or invalid property assignment

    invalid property assignment vbscript

  6. iBrowse Error "Wrong number of arguments or invalid property assignment

    invalid property assignment vbscript

VIDEO

  1. Warning Invalid DOM property tabindex Did you mean tabIndex

  2. Invalid Property Value Error Fixing in Barcode Label Software

  3. Invalid DOM property react bootstrap error

  4. Metal Slug 1.0.4 VPX

  5. VBScript

  6. Assignment in Change of Control