right click a sheet tab and pick View code.
In the project window double click the Thisworkbook object

paste the code in there.