View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jake Marx[_3_] Jake Marx[_3_] is offline
external usenet poster
 
Posts: 860
Default Write to Array from other closed Excel file

Hi Dave,

You can use ADO to get data from a closed workbook. There are some
limitations, but it should be much faster than opening the workbook and
retrieving values. Once you have the recordset open, you can use the
GetRows method of the RecordSet object to put the values into a
2-dimensional array.

http://www.erlandsendata.no/english/...mportwbado.php

--
Regards,

Jake Marx
www.longhead.com


Dave B wrote:
Hello,

Excel 2000

In an effort to speed up a report generating Excel file, I am
experimenting with NOT opening the Excel database file which is huge
and takes 20 seconds to open.

I need vb code that will get data from specified cells in an unopened
Excel file (database) and then write to an array (created in vb) in
my current file. I want to do this entirely in vb (I don't want to
write a formula to a range and then put in an array). Is this
possible? Any examples?

Thanks, you guys are a great resource.

Dave