I'm trying to access the data from an Excel Range in VBA.
Set fcr = Sheets("FC_Detail").UsedRange
row2 = fcr.Offset(1, 0).Resize(1).Value
row2Val = row2(1)
In this example the Variant row2 should store a 2D array of the 2nd row of the worksheet "FC_Detail" and the Variant row2Val should store the 1D array. (I split into 2 steps to aid debugging.) I can see from the debug window that row2 is exactly what I expect, but I get an error calling row2(1) in my code and in the debug window.
What's weird is that the debug window here says that row2 is a Variant of size (1,45) and that row2(1) is a Variant of size (45). But when I try looking at row2(1) I get an error.
What am I doing wrong?