LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default ADO - recordset - closed excel workbook

the SourceRange must have a format like
"sheet1$A2:D100"

note the $ is used as the pipe.
the rangeref must be A1 relative notation.

"Build like this...

Set rngQry = Range("A1:d100")
strqry = rngQry.Worksheet.Name & "$" & _
rngQry.Address(0, 0, xlA1)



keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


graham d wrote:

Heres my query

I have a closed work book I wish to extract results from into my open
workbook

1. I know the path where the closed spreadsheet file lives
2. I know the sheet name and cell that i want to read into my recordset

however!! NB This sheet is sent to me by someone external and there are
no named ranges in 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
ADO - recordset - closed excel workbook - know sheet name and cell name but no named ranges defined grahamd Excel Programming 1 October 18th 04 06:13 PM
Recordset or Object is closed HELP PLEASE! DBAL Excel Programming 10 July 28th 04 09:36 AM
Recordset Problem - object is closed DBAL Excel Programming 0 June 4th 04 11:55 PM
how to run macro of closed excel workbook using VBA santoshkumar Excel Programming 3 November 10th 03 02:23 PM
open range (within workbook) as ado recordset - excel vba S. Daum Excel Programming 0 July 25th 03 04:45 PM


All times are GMT +1. The time now is 07:46 AM.

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"