Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

get data from a workbook which is not open 1

Status
Not open for further replies.

sunnytahir

Programmer
May 11, 2003
32
Dear Sirs,

I want to get data from some workbooks which are not open.
is it possible?

Thanks.
Tahir
 
You may consider ODBC

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
John Walkenbach shows VBA code to retrieve data from a closed workbook in
This method is much faster than opening the workbook, but you do have to know the Path, file name, worksheet name, and cell address of the desired information.
 
Tahir,

Take a look at ths spreadsheet feature in Data/Get External Data -- Excel Files -- Your Closed Workbook.

The data must be in Table Format, best with one sheet per table. You can design queries in a QBE Grid. You can also have parameters to pass to the queries.

I often set up the initial query, then macro record editing the query, and use that code as the basis for making a fully interactive report application.

However, if you need to update the external Excel file, it must be done via DAO or ADO. In that case, I recommend putting your Excel database in a real database instead.

:)

Skip,

Want to get great answers to your Tek-Tips questions? Have a look at faq222-2244
 
Dear Sirs,
Thanks all for giving attention to my question. it helped me very much.

i want to ask dear PHV that what is ODBC (a some breif note) or sites where i can find help about ODBC. i will be very thankful to you.

Best regards.
Tahir
 
The ODBC (Open DataBase Connectivity) way is quite the same as the Skip's suggestion.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Dear PHV,
Thanks for your prompt reply.

i am new to vba and i could not understand the SKIP's about DAO, ADO, and QBE Grid. So please give me any examples to how i can understand the ODBC.

Best regards.
tahir
 
Tahir,

Search and you will find many books on the subject.

Search
and
and these forums



for ODBC, ADO, DAO in both cases and you will find plenty of stuff to help you.

Note that these forums are not a helpdesk, and you need to research this for yourself, and after that if you have specific issues with a piece of code THEN we will be able to help you with it.

Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Also try searching the excel VBA help files - there's lots of useful info in there

Rgds, Geoff

Never test the depth of water with both feet

Help us to help you by reading FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top