Adding data to a closed workbook without opening it

Joined
Feb 20, 2002
Messages
48
Is there a way to copy data from an open workbook to a workbook that is not open without opening it?

Example: Open workbook "book1.xls" cell A1 value = 35. I want this value to be copied to closed workbook "book2.xls" sheet "sheet5" range "B5" using vba, but without having to open the workbook. Is this possible???

Aloha,
Rey

(...BfM, check your private messages...Aloha.)
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
It is possible to retrieve (read) data from a closed workbook. You can't write data to a closed workbook. Is there some reason you can't open it?
 
Upvote 0
Hi,

I'm sure somebody will correct me if I'm wrong, but I don't think you can write to a closed workbook. (Although you can read from one - check out Dave Hawley's site).

What is the reason for not wanting to open the workbook? Perhaps somebody could come up with a work-around.
 
Upvote 0
Good questions all...to let you in on my reasoning (experience has led me to pose the question in the first place), I need to update close to 800 workbooks. I have already done updating these same workbooks many times before via opening every single workbook with a looping macro and having the macro update each workbook one at a time. I would always have to do it as I leave work, as it would take hours to complete. I would normally always get "out of memory" errors every time I would return to work the next morning (even using a set rdorange = nothing line) before being able to complete updates to all workbooks. I thought to myself, "There must be a better and more efficient way to do this!" I have pondered using Access because it is more efficient for what I need--(I do use Access for certain other projects). The thing is, Excel is so much easier for me to use and "program" than Access, even if it not as efficient in handling certain things I use Excel for now.

Anyway, sorry for the novel, but that in a nutshell is why I dare to ask a probably ridiculous question--(inquiring minds want to know!) Oh, btw, I am doing the reverse now in some of my projects (that is, take data from a closed workbook and write the data to an open workbook).

Still waiting for some guru-type with an answer...

Rey

BfM...thanks for the heads-up, I'll try to PM Knitemare...a hui hou, malama pono.

Brian from Connecticut, if you are browsing, I will email you tonight...been so busy since I last wrote months ago...Aloha!
 
Upvote 0
...I don't believe it can be done. Oh well, gotta go with the old routine. Good to ask anyway, at least I know for sure it can't be done. But still, who knows...I was sure hoping someone out there would've dazzled me on this.
 
Upvote 0
Dunno about writing into an existing workbook, but there are VB programs out there that can write out a simple excel file without having excel running on the machine. Try searching the net.
 
Upvote 0
You can access your Excel tables through Access. They do not require opening. Hopefully your data is, or can be, in such a form that Access can understand your feilds, but if not, can be worked around.

VB will also let you access Excel tables IN ADDITION to being able to edit them directly without opening. Its actually pretty easy.

In Access, just get external data, but I think you edit the info in Access, the source data is unaffected.

I think this can be done.

The VB way is the best, I don't know if you have VB 6.0, but if you send me a sample of one of the ~800 sheets, I could check in to connecting the two.

Of course, I'm at work now, so I wouldn't be able to tell you for sure now (VB 6.0's at home, btw), but could by tommorrow.

If you don't have a serious deadline to meet, I don't think this will be too hard.

Corticus

P.S. linking data-sources is much fun for me, I wouldn't mind playing around with it for a while...
This message was edited by Corticus on 2002-08-21 07:10
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,484
Members
448,967
Latest member
visheshkotha

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top