Can someone help with the following code problem?
I have 2 open files (WorkBooks).
I am writing code, to go from one to the other (the "other" has a known name). In this other I will copy a range of cells. These cells are to pasted into a specific sheet in THE FIRST WORKBOOK (which WorkBook has an UNKNOWN NAME).
I have no problem going from the first to the other and copying the range I want, but how do I get back to the first WorkBook?
This code actually works for the situation described, but if I have 2 identical WorkBooks (with different names) open plus "the other" WorkBook, with the known name and the source of the range I want to copy, then it jumps back to the second of the identical WorkBooks. Not to the one WorkBook in which I activated the code.
Instead of
I would like to have
But this does not work.
Is there a way to come back to the WorkBook from which I activated the code?
I would be greatful for some tips.
Thanks in advance
Ulfah
Bookmarks