I tried this logic
Dim epm As New FPMXLClient.EPMAddInAutomation
Sub change context()
Dim CONNE As String
CONNE = epm.GetActiveConnection(ActiveSheet)
'To set context
epm.SetContextMember CONNE, "CURRENCY", Range("A1")
'To refresh
epm.RefreshActiveWorkBook
End Sub
And It worked.
But, this only works once I put an Button.
I don't know where IN VB I can trigger the automatic like
Dim epm As New FPMXLClient.EPMAddInAutomation
Function AFTER_CONTEXTCHANGE()
Dim CONNE As String
CONNE = epm.GetActiveConnection(ActiveSheet)
'To set context
epm.SetContextMember CONNE, "CURRENCY", Range("A1")
End nFunctio
Where in VB I can write this code to it refresh automatically?
Thanks