Skip to Content
0
Mar 17, 2021 at 03:55 AM

After_ContextChange not working

50 Views

Hi,

I have a workbook with the following VBA code.

Function AFTER_WORKBOOK_OPEN()
    MsgBox "On Open"
End Function
    
Function BEFORE_CONTEXTCHANGE()
    MsgBox "Before Context Change"
End Function

Function AFTER_CONTEXTCHANGE()
    MsgBox "After Context Change"
End Function

and the sheet has a button with the following

=@EPMContextMember(,"DEPARTMENT")

When I change the context, the Before_ContextChange message displays but the After_ContextChange message does not display. If I remove the After_Workbook_Open, the After_ContextChange message displays fine. Can someone offer a suggestion as to the cause?

Thanks

Cliff