Passing Macro control between workbooks without interference
Posted on 2007-10-03
I have two Excel spreadsheet in two different workbooks A & B containing VBA macros that run independently. The two spreadsheets have the same set of stock symbols. Sheet 1 in A contains macros that determine a buy/sell trigger based on a data feed (DDE), while sheet 1 in B places the order based on the trigger from A. Sheet 1 in B has the worksheet_calculate macro to place the order upon entry of the trigger in a particular cell. After the macro from A copies the trigger to sheet 1 in B, what do I need to do to pass control back to the first sheet and then letting the second sheet operate independently? How can I prevent any interference by the macro from the first workbook on the second?