A macro putting data in a closed workbook?


Posted by Paul Magruder on March 20, 2001 7:54 PM

Is it possible to run a macro in "Book1" and have the macro put the data in "Book2" if Book2 is closed? Example: Workbook "Book1" has data in "sheet1" range ("a1")
I want to put the data in the same range in workbook "Book2" without opening workbook "book2".
I know how to do it if both workbooks are open, but can i do it if one of them is closed?

Thanks in advance...... Paul

Posted by David Hawley on March 21, 2001 12:36 AM


Hi Paul

I think you will find the answer is no! The method I use to overcome this is to have a macro in the Workbook_Open event that places formulas (simple or complicated) in the appropriate cells to reference the other workbook. I then use SpecialCells to eliminate any Errors, blanks etc. The code then converts these to Values only.

When done correctly you will not even notice it happening.

Dave
OzGrid Business Applications

Posted by David Hawley on March 21, 2001 4:13 AM

I was thinking...

Paul, as you will not actually see the data inputed into the closed workbook unless you open it, or extract it while it's still closed. I thought this may be of intrest to you:
http://www.j-walk.com/ss/excel/tips/tip82.htm
Great site too!!

Dave

OzGrid Business Applications



Posted by Paul Magruder on March 21, 2001 9:51 AM

Re: Thanks


Paul :