Want an EXCEL RECORDSET based on an EXCEL RANGE - The plot thickens!
Posted by bill on November 16, 2001 8:25 AM
Hello.
Using RECORDSETS in ACCESS, you can quickly copy a RECORDSET to an ARRAY.
I assume you can do the same in EXCEL.
So, if you were to define an EXCEL RECORDSET to a workbook RANGE, it seems plausable to use the RECORDSET METHOD:
.GetRows
Doing so would yeild something like:
Dim RS As Recordset
Dim lngLastRow As Integer
Dim lngRows as Integer
Dim varData as Variant
lngLastRow = Range("A65536").End(xlUp).Row
Set RS = Excel.Range("A2:B" & lngLastRow)
varData = RS.GetRows(lngLastRow) ' You CAN specify a number greater than the actual RANGE. GetRows will not crap out!
I get a TYPE MISMATCH using the Set Command.