![]() |
activating workbooks
Hi All
I have two workbooks with various stuff in the workbook.activate procedures, now the problem is that if I have both workbooks open and get the macro to close the initial workbook the next workbook that is defaulted to does not run any code in the workbook.activate procedure or in the (windowactivate in sheetactivate). Does anyone know how to force these to run. It seems to work if I just click to close tab on the window but something different must happen when I run macros as it doesn't perform in exactly the same way. Thanks heaps Jase |
activating workbooks
run the code explicitly in the macro that closes the workbook.
You will probably have to make the procedure Public. I assume it is in the ThisWorkbook module, so perhaps you could put a procedure in that same workbook that runs it and then call that procedure from the other workbook using application.run -- Regards, Tom Ogilvy Jase wrote in message ... Hi All I have two workbooks with various stuff in the workbook.activate procedures, now the problem is that if I have both workbooks open and get the macro to close the initial workbook the next workbook that is defaulted to does not run any code in the workbook.activate procedure or in the (windowactivate in sheetactivate). Does anyone know how to force these to run. It seems to work if I just click to close tab on the window but something different must happen when I run macros as it doesn't perform in exactly the same way. Thanks heaps Jase |
All times are GMT +1. The time now is 07:42 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com