Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Selection or Recordset to Array

Hello:)
I take data with two ways.
1. From acces, sql with select string
2. From Sheet in Excel

Is any idea to put data from "Selection" to Array?
Like this:
varArray()=selection
or
varArray()=newRS ' active recordset
I made now loop:
For or Do While through
- all records in recordset
- all rows in demension (selection), row by row, field by field.


Tx for any advice:)




*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Selection or Recordset to Array

read Help

dim arr as Variant
arr = Selection

DIM rs as Recordset

' populate from database


Range("B2").Resize(rs.RecordCount, rs.Fields.Count).CopyFromRecordset
rs




<Witek wrote in message ...
Hello:)
I take data with two ways.
1. From acces, sql with select string
2. From Sheet in Excel

Is any idea to put data from "Selection" to Array?
Like this:
varArray()=selection
or
varArray()=newRS ' active recordset
I made now loop:
For or Do While through
- all records in recordset
- all rows in demension (selection), row by row, field by field.


Tx for any advice:)




*** Sent via Developersdex http://www.developersdex.com ***



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
Copy an array into an ADO recordset? quartz[_2_] Excel Programming 3 January 4th 06 08:10 AM
Recordset Filter by Array Kou Vang[_2_] Excel Programming 0 February 1st 05 04:31 PM
Passing an array or recordset to a stored procedure Robin Hammond[_2_] Excel Programming 1 December 2nd 04 05:15 AM
Passing an array or recordset to a stored procedure Jamie Collins Excel Programming 1 December 2nd 04 05:15 AM
Copy Recordset into array? Andrew_blue Excel Programming 2 May 6th 04 07:23 PM


All times are GMT +1. The time now is 01:27 AM.

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"