Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 459
Default getting data from closed workbook

First, this code is famous in the Excel community and originates from:

http://www.erlandsendata.no/english/...dacimportwbado

Second, I just tried it as you suggested (i.e. enter a random file
path) and I too got an error, 'Subscript out of range' because the
recordset only contained only one row so the resulting array has only
one dimension (the code expects two dimensions).

To be fair, I think the code is intended to demonstrate ADO with Excel
rather than provide a workable solution in all circumstances. It
doesn't contain much validation or error handling so it replies on the
user supplying sensible values. GIGO, as we say.

Have a look at your range, the one at which you've pointed the code.
Is it laid out as a database i.e. rows of columns (preferably more
than one of each)? If you're still having problems, post back with
your data.

--

"keyur" wrote in message ...
hi

i am using the second code on this page to get data from a
closed workbook

http://www.exceltip.com/st/Import_da..._closed_workbo
ok_(ADO)_using_VBA_in_Microsoft_Excel/429.html

i entered the file location in the tester module. i dont
see anything else that needs to be change. i skips to the
message. and then gives me an error Type mismatched at
For r = LBound(tArray, 1) To UBound(tArray, 1)

can someone help me get throught this please.
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
Is there a way to referance data from or to a closed workbook from Ken C[_2_] New Users to Excel 5 September 23rd 09 06:45 PM
Get Data From Closed Workbook Minitman Excel Worksheet Functions 20 March 18th 08 09:50 PM
getting data from closed workbook onedaywhen Excel Programming 0 April 2nd 04 09:08 AM
getting data from closed workbook John Williams[_4_] Excel Programming 0 April 1st 04 09:08 PM
Accessing Data from Closed Workbook Wolf[_2_] Excel Programming 0 September 5th 03 09:39 PM


All times are GMT +1. The time now is 06:26 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"