In a worksheet I can attach code to an event like so:
Private Sub Worksheet_Calculate()
' .. code here
End Sub
How can I get a reference to the worksheet the event was generated in?
I want to have a 100% secure way, so I don’t have to worry about code breaking when the name worksheet changes etc.
ActiveSheet is not correct because it is not guaranteed that any sheet is active upon (re)calculate.
You can use caller: