The goal is to define a variable, in this case C, as the number of rows in a range stored in an array. The inputs (1-4) are defined using the "Defined Name" function in EXCEL. The (.Rows.Count) appears to only work with the range function. Any suggestions would be greatly appreciated. I can explain what I'm trying to do in more detail if need be.
Private Sub Pop_Click() Dim INPUT1 As Variant: INPUT1 = Range("INPUT1").Value Dim INPUT2 As Variant: INPUT2 = Range("INPUT2").Value Dim INPUT3 As Variant: INPUT3 = Range("INPUT3").Value Dim INPUT4 As Variant: INPUT4 = Range("INPUT4").Value Dim INPUTS As Variant: INPUTS = Array(0, INPUT1, INPUT2, INPUT3, INPUT4) Dim C As Variant: C = INPUTS(1).Rows.CountEnd Sub