LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel Create Array Variable

#1
for a non-contiguous range, you would need to loop through the cells and add
the values one at a time to each element of the range.

#2
A variant variable can be passed an array. So I believe you can assign a
record to a variant and it will be passed as an array.

this article shows how to do it with DAO
http://support.microsoft.com/default...;en-us;q149254

rs.MoveLast
x = rs.RecordCount
rs.MoveFirst
'Return the records to an array variable.
varrecords = rs.GetRows(x)


I assume you could do something similar with ADO.

--
Regards,
Tom Ogilvy




"Brian" wrote in message
...


Thanks for the help and explanation. Two more questions to conclude
this topic:
1) Is there a way to make it so that you could do this fill this array
from a select **non-contiguous** range? It appears the transpose
function only works on a contiguos range.

2) How would I go about using the same type of result for an access
query table or query?

Thanks for all of your help - it is truly appreciated.

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!



 
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
how can I create a dummy variable in Excel? Statistically Lost Excel Discussion (Misc queries) 1 April 19th 10 08:42 PM
Using COUNTA for a variable array Schannah Excel Worksheet Functions 5 July 22nd 08 05:02 PM
create a "variable array?" to report data Jeff Excel Discussion (Misc queries) 1 May 6th 08 08:44 PM
create a multivariable regression in excel without using array dls Excel Worksheet Functions 1 August 23rd 05 08:50 PM
Problem trying to us a range variable as an array variable TBA[_2_] Excel Programming 4 September 27th 03 02:56 PM


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

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

About Us

"It's about Microsoft Excel"