Where are you putting the code? It must go in the ThisWorkbook module.
Regards, Rory Microsoft MVP - Excel
Forum Rules