Skip to Content

Possible to check if RefreshActiveWorkBook vs other refresh options?

Is there a method to identify what type of refresh a user has executed? Specifically, I want to execute a macro (unhide worksheets) if a user runs RefreshActiveWorkBook, but I do NOT want this to happen if a user conducts any other type of Refresh.


I'm familiar with Function Before_Refresh() but I can't think of a way to capture the refresh if entire workbook. Any ideas?

Here's a theoretical example if I could somehow get the RefreshType (This is not a real condition)

Function Before_Refresh()
    If RefreshType = RefreshActiveWorkbook Then
      'Run unhide sheets macro
    End If
End Function
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jul 19, 2018 at 06:42 AM

    No, it's not possible with the current EPM API.

    Some workaround: you can disable the refresh button on the EPM bar and create the custom button to refresh - then you can use your macro.

    Add comment
    10|10000 characters needed characters exceeded