View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
keepITcool keepITcool is offline
external usenet poster
 
Posts: 2,253
Default Can't assign to Array .GetRows in Excel 97

did you try ?

dim arrCountries as variant
(note it's NOT dimmed as an array)

keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"?B?TGVubg==?=" wrote:

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