I have a cell that is a formula based off pivot table. The value will change with slicers that the user can select from.
How do I have the workbook refresh every time the value of the cell changes?
What I have so far is:
In Sheet1 object:
Private Sub Worksheet_Calculate()
If Range("E7").Value <> PrevVal Then
ActiveWorkbook.RefreshAll
End If
End Sub
But how do I make PrevVal equal the previous value of the cell before the change? or how do I make it so that the workbook will refresh once E7 changes?
How do I have the workbook refresh every time the value of the cell changes?
What I have so far is:
In Sheet1 object:
Private Sub Worksheet_Calculate()
If Range("E7").Value <> PrevVal Then
ActiveWorkbook.RefreshAll
End If
End Sub
But how do I make PrevVal equal the previous value of the cell before the change? or how do I make it so that the workbook will refresh once E7 changes?