cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Call a macro when there is a change in page axis member.

former_member566000
Participant
0 Likes
231

Hi,

I am currently working on SAP BPC 11.0 Standard. We are trying to call a macro in the report whenever a page axis member in a dimension is changed.

In the below template, whenever more than one core fund is selected in 'J9' after page axis selection we want to trigger a validation macro. The macro is working fine but any change in the page axis cell 'J9' does not trigger an event in excel and it is currently executed when there is a click on the cell after the selection is made which is making it as two different activities.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)


Dim WS As Worksheet
If Selection.Count = 1 Then
    If Not Intersect(Target, Range("J9")) Is Nothing Then
        Set WS = ThisWorkbook.Sheets("Sheet1")
        Call validateCoreFund(WS)
    End If
End If

End Sub

Kindly suggest.

Thanks!

Samhita

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member186338
Active Contributor

First of all, Worksheet_SelectionChange is the event triggered when user select some cell or group of cells. No relation to value changes

There is another event Worksheet_Change, but it will not trigger because it's not the user, who is changing the value, but the code of EPM AddIn

When you select members for page axis report refresh will happen - you can use refresh event to trigger your code

Look on BEFORE_REFRESH and AFTER_REFRESH in EPM API