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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with opening and closing excel files in vb

Status
Not open for further replies.

incagold

Programmer
Mar 21, 2003
54
0
0
Hi everyone,

Another newbie question.

Is there a way to open a list of excel files, copy some data, close the excel file and loop to the next without having to close the excel application? The data is located in cells that are in various locations on the spreadsheet.

Please, excuse me, I am brand new to this and don't know what to do. The need is urgent, so any help you can provide, including code example if possible, would be greatly appreciated.

Thank you very much,

AMF
 
Yes, the application object is totally different from the workbook object.
 
Hi bjd4jc,

Thank you for your quick reply.

As I said I am new to all of this. Is there a place I can go to that will provide me the syntax to do this. The problem I have is I must open a total of 413 Excel files, extract some information from differing areas of each spreadsheet. This information will be saved to an Access table. After the extract, I need to close each of the workbooks, as some of them are very large. I just don't know where to begin and would benefit if there was an example of how coding this would work. Thank you again for your help.

AMF
 
its not brilliant but take a quick look at faq222-3383

might provide the spark of inspiration to get u started.

good luck

If somethings hard to do, its not worth doing - Homer Simpson
 
I've just done a search on this forum from "excel open file" and I found plenty of threads with the information you need.

you will need to dig through the posts, then if you need help post your code here and people will help you solve the problems you encounter

Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Thanks to all of you for your responses and help. It is greatly appreciated.

ADoozer - a special thanks for the code reference it did spark the thought process and helped get to a solution.

fredericofonseca - thanks for your advice. I apologize for my ignorance. I hope to learn soon. I did search the posts but did not ask the right question. Again, this is learning issue with me. Thank you for taking the time to respond. I do appreciate it.

AMF
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top