Open a wb and keep the focus on it
I have a macro that I want to run from one workbook (Summary.xls) that opens
another workbook (Source.xls), adds a worksheet (Summary_Sheet) and then runs
a series of commands on the second workbook (Source.xls) before moving the
new sheet (Summary_Sheet) to the original workbook (Summary.xls). The
(Source.xls) filename changes every month, so I don't want to hardcode it.
My problem is that the macro opens the Source file, but shifts back to the
original file to create the worksheet and run the commands. How do I keep
the focus on the file I just opened without hardcoding the filename?
Thanks for any help I can get.
|