Is your code on the sheet, or is it out in a Module?

Also, in your code you call ActiveSheet a number of times which will only refer to the top active sheet.