MyLady


Hey,

How do I, with VBA code, update a cell in a closed workbook when a cell in the active workbook changes

When the update is done, the cell value in the closed workbook shall have the same value as the changed cell in the active workbook.

Best Regards

Cathrine




Re: How do I update a cell in a closed workbook?

MyLady


No answers, then I guess it can¡¯t be done with VBA code¡­ or can it, anybody

Cath






Re: How do I update a cell in a closed workbook?

Andy Pope

Hi,

This article maybe useful.
http://www.excelkb.com/article.aspx id=10155&query=update+closed+workbook

If you are using code what is the reason for not opening, updating and then closing the workbook via code







Re: How do I update a cell in a closed workbook?

MyLady

Hey Andy,

Thanks for your reply!!!

I have played around with the code in the article you pointed to, but it gives me the compile error ¡°User-defined type not defined¡±. What to do¡­ any ideas/ solution

Cath





Re: How do I update a cell in a closed workbook?

Andy Pope

Did you include the reference to the library as stated at the top of the page

External reference(s):
  • Microsoft ActiveX Data Object 2.5 Library and later.

Use menu Tools > References..






Re: How do I update a cell in a closed workbook?

MyLady

Hey again Andy,

Great thanks for the reminder!

I forgot that¡­ it works fine.

And to your question, for the curiosity reason, if it could be done, I wanted to try out this method instead of opening the workbook. It could be useful one day¡­

Cath