Sir Babydum GBE
01-23-2008, 10:01 AM
I have a macro recorded in MyWorkbook.xls.
The macro reorganises columns and picks up information from whatever workbook is the active one, copies it, then pastes it to MyWorbook.
How can I get the macro to first check that MyWorkbook.xls isn't the active one - and if it is, put up a message: "Please activate the source workbook and re-run the macro" - and then exit the code? Whereas - if it's not the active book - it can carry on as normal.
Thanks
BD
The macro reorganises columns and picks up information from whatever workbook is the active one, copies it, then pastes it to MyWorbook.
How can I get the macro to first check that MyWorkbook.xls isn't the active one - and if it is, put up a message: "Please activate the source workbook and re-run the macro" - and then exit the code? Whereas - if it's not the active book - it can carry on as normal.
Thanks
BD