Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Activating Workbooks | Excel Discussion (Misc queries) | |||
activating workbooks | Excel Discussion (Misc queries) | |||
Activating links | Excel Discussion (Misc queries) | |||
Activating a Checkbox | Excel Worksheet Functions | |||
Hide/Show modeless userform when activating/deactivating workbooks | Excel Programming |