Private Sub Worksheet_Activate()
Dim aSheet As Worksheet
Set aSheet = Sheets("CALCULATOR")
If (ActiveSheet.Name = aSheet.Name) And (aSheet.Range("N1").Value <> aSheet.Range("N9").Value) Then
MsgBox "Rates not applied! Please press Apply Rates button on ADMIN sheet to apply rates.", vbCritical, "Rates Not Applied!"
I have the above sub in coding section of "Thisworkbook"
What I am trying to do is, give a warning message if on a worksheet called "Calculator", 2 numbers are different.
However, this is not triggering when I open the 'Calculator' sheet tab!?
Could you please let me know how to run this and how to run this only once when being swtich from a particular tab?
That is, only run it if the previous tab name is 'Admin' (where I was)
Thanks for any help!