Good night,
I have this code in thisworkbook module and it works beautifully. How do I trigger the Workbook_Deactivate sub though? Pressing the ESC key doesn't work.
I have this code in thisworkbook module and it works beautifully. How do I trigger the Workbook_Deactivate sub though? Pressing the ESC key doesn't work.
VBA Code:
Private Sub Workbook_Activate()
Application.ScreenUpdating = False
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"
Application.DisplayFormulaBar = False
Application.DisplayStatusBar = Not Application.DisplayStatusBar
ActiveWindow.DisplayWorkbookTabs = True
Application.ScreenUpdating = True
End Sub
Private Sub Workbook_Deactivate()
Application.ScreenUpdating = True
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",True)"
Application.DisplayFormulaBar = True
Application.DisplayStatusBar = True
ActiveWindow.DisplayWorkbookTabs = True
End Sub