try to press ALT + F11 then find in the left window name of sheet in which this macro should works and double-click this sheet. after this paste the code into widow which appear