Workbook Activate Event & Custom Toolbar

  • I have two similar workbooks with

    • Activate Event to show/create customed toolbars
    • Deactivate Event to hide/remove customed toolbars
    • Exit routine (reside in a Module) to save and close the workbook (and trigger the Deactivate Event)


    However, while closing one workbook through the Exit routine (not by clicking the close button) does trigger the Deactivate Event to remove the customed toolbar, it does not trigger the Activate Event of the second workbook to bring back its own toolbar.


    Can anyone help?

  • Re: Workbook Activate Event


    The following ExitRoutine is called from one of the customed toolbar item:


    Code
    1. Sub ExitRoutine()
    2. Activeworkbook.Close True
    3. End Sub
  • Re: Workbook Activate Event


    Yes, it's strange that it gives an error if you put the ExitRoutine under Module1 but no error if you put it under ThisWorkbook or any Sheets.


    Thank you for the workaround which works for me!