I have a simple table on worksheet "Table" in Excel. Let's say the table is called "SortTable" and has 8 rows by 4 columns. I want to populate a vba array with the contents of the table. I have seen 3 or 4 ways of doing this. None work for me - I get the error message "Can't assign to array". Here are a couple of examples of how I attempted this. Would appreciate your help. I use "Option Base 1". Thanks very much.
Dim SArray(1 To 8, 1 To 4) As Integer, SortTable As ListObject
SArray = Worksheets("Table").ListObjects("SortTable")
OR
SArray = Worksheets("Table").Range("A1:D8")
Dim SArray(1 To 8, 1 To 4) As Integer, SortTable As ListObject
SArray = Worksheets("Table").ListObjects("SortTable")
OR
SArray = Worksheets("Table").Range("A1:D8")