Skip to Content
Jul 18, 2018 at 04:51 PM

Possible to check if RefreshActiveWorkBook vs other refresh options?

198 Views Last edit Jul 18, 2018 at 04:53 PM 2 rev

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