I'm using VBA in Excel 2007 and noted that, when assigning a range to an array, one of these works, but the other doesn't:
vrtExceptionsList = Worksheets("Exceptions").Range("A1:B80") <----WORKS LIKE A CHARM
vrtExceptionsList = Worksheets("Exceptions").Range(Cells(1, 1), Cells(80, 2)) <---GIVES APPLICATION/OBJECT-DEFINED ERROR
I'd really like to use the second method so I can have a variable for the last row instead of some arbitrary number (80 in this case).
Any ideas why the 2nd method doesn't work for me?
Thanks,
-Jim
Bookmarks