cancel
Showing results for 
Search instead for 
Did you mean: 

Error in ClearAllCacheTo Get error in BPC reports

former_member398742
Participant
0 Kudos

Hi Everyone,

I have one work book and have below code to refresh for all the sheets when sheet is active.

When I switch from EPMFormattingSheet to any sheets then i am getting below error Please see below SS.

-------------------------------------------

Private Sub Worksheet_Activate()

Application.EnableEvents = False

Dim epm As New FPMXLClient.EPMAddInAutomation

epm.RefreshActiveSheet

Application.EnableEvents = True

End Sub

-----------------------------------------

Can you please help me is there anything problem in my code?

Note: I cleared cache but i am still getting same error and,works fine if i dont have above code for all sheets.

Thanks,

Vishu

View Entire Topic
former_member186338
Active Contributor
0 Kudos

check sheet name in your code before refresh.

former_member398742
Participant
0 Kudos

Hi vadim,

As you suggested i tried with below code but i am still getting same error.

Private Sub Worksheet_Activate()

If ActiveSheet.Name Like "EOP CO by Scenario" Then

Dim EPM As New FPMXLClient.EPMAddInAutomation

EPM.RefreshActiveSheet

End If

End Sub