How can I make reference to the ThisWorkbook object in workbook 1 from the code in a module in workbook 2 in Excel 2013?
I have 2 workbooks open and I need to delete 4 lines of code from the ThisWorkbook Object in the other workbook. The reason for this is because the 4 lines of code are in the On Deactivate event and when the other workbook gets the focus the event runs. I connot turn off events or the event in workbook 2 won't run when they are supposed to. I had hoped it I activated workbook 1 that it would reference the correct vbaproject, but it doesn't. Here's the code I tried:
I tried numerouse variations but I can only seem to delete the lines of code from the workbook that the macro is running from (workbook 2)![]()
Please Login or Register to view this content.
I'm out of ideas! Please help
Bookmarks