I have not run into this issue yet and I have no clue what is wrong with the following code. Using "watch" in the IDE i was able to see that tbl(i) is retrieving the correct table in the first 'Declare tables' section, but when i try to call it again in the next section of code, it says there is nothing stored in tbl(j).
Code:
' Declare tables
Dim i As Integer
For i = 1 To sheetqty
ReDim tbl(i) As ListObject
Set tbl(i) = wb.Sheets(i).ListObjects(1)
Next i
' Get unique fixtures
Dim typesqty As Integer
Dim rowCount As Integer
Dim tblTemp As ListObject
Dim j As Integer
For j = 1 To sheetqty
Set tblTemp = tbl(j)
rowCount = tblTemp.ListRows.Count
For a = 1 To rowCount
If tblTemp.Range(a + 1, 1) <> 0 Then typesqty = typesqty + 1
Next a
' Copy fixture quantities
ReDim fixturetype(typesqty) As String
ReDim fixtureqty(typesqty) As Integer
For a = 1 To typesqty
fixturetype(a) = tblTemp.Range(a + 1, 1).Value
fixtureqty(a) = tblTemp.Range(a + 1, 2).Value
Next a
Next j
Am i missing something? This should work, right?