I need to store the length of a dynamic range based on an initial cell selection and then selecting down to the end of the column. Here' where I am at now
Sub Macro1()
Dim number_prop_components As Integer
Dim range_prop As Range
Range("C26").Select
Set range_prop = Range(Selection, Selection.End(xlDown)).Select
number_prop_components = range_prop.Height
MsgBox (range_prop.Height)
End Sub
When I run the code and get to the line:
Set range_prop = Range(Selection, Selection.End(xlDown)).Select
I get the error:
Run-time error '424': Object required
How can I store a dynamic range and then get it's height or width stored as an integer?