ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Can't assign to Array .GetRows in Excel 97 (https://www.excelbanter.com/excel-programming/302353-cant-assign-array-getrows-excel-97-a.html)

Lenn

Can't assign to Array .GetRows in Excel 97
 
Thank you in advance. Any help will be extremely appreciated; this project has to be turned in by tomorrow.

I developed a macro in Excel 2000. It uses ADO to connect to Access db. Before handing it in to the client I wanted to test this macro in office 97 (that's the version client is using). The following line of code generates compile error "Can't assign to array" :


arrCountries = oRSCountries.GetRows()

arrCountries is Dimmed as
Dim arrCountries() As Variant

The same code works under Excel 2000.
I have ADO 2.7 Reference check in both. What can be the problem? Any ideas?

Thanks



All times are GMT +1. The time now is 05:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com