So on the activate event
Set LastWS = ActiveSheet
works fine but then once you deactivate the worksheet the value seems to be lost switching back to Sheet1 from any sheet in between 2 and 5 (5 total)
Because I get an object with error unless I use Set LastWS in Sheet1 which is where the code above will compile