This will not work in a module.

Instead press "alt + F11" and then db-click on the sheet where the code should run, in the project overview on your left.
Then paste the code here.