Hello,
I'm trying to make my first array and hitting a snag. I'm making a macro that automatically runs upon opening any Excel file. I'm having a runtime error of 438, Object doesn't support this property or method. I feel it's from incorrectly defining my active sheet. How would I properly do this?
Thanks!
I'm trying to make my first array and hitting a snag. I'm making a macro that automatically runs upon opening any Excel file. I'm having a runtime error of 438, Object doesn't support this property or method. I feel it's from incorrectly defining my active sheet. How would I properly do this?
Thanks!
Code:
Dim StrArr(89) As String, i As Integer
i = 3 ' change to start value
Do While ThisWorkbook.ActiveSheet.Cell(i, 1).Value <> ""
StrArr(i - 3) = ThisWorkbook.ActiveSheet.Cells(i, 1).Value
i = i + 1
Loop
MsgBox StrArr(0)MsgBox StrArr(1)MsgBox StrArr(2)MsgBox StrArr(89)
Last edited by a moderator: