Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Can't assign to Array .GetRows in Excel 97

It did it!!!! Thanks a lot KeepItCool, you are Cool!

"keepITcool" wrote:

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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assign Values to array Jeff Excel Discussion (Misc queries) 14 July 15th 08 06:06 PM
Can't assign to Array .GetRows in Excel 97 Lenn Excel Programming 0 June 24th 04 12:58 AM
How do I assign values to an array? Skyway[_2_] Excel Programming 14 February 29th 04 01:22 AM
Possible to assign an array to a SeriesCollection Stephen Boulet Excel Programming 2 November 13th 03 06:36 PM
ADO slow recordset getrows RB Smissaert Excel Programming 4 August 10th 03 08:22 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"