Hello again,
For a standard procedure, house the code in a normal module. To create one, hit alt-f11 to enter the VBE, and click Insert->Module.
You'll want to remove sheet references as well. In some cases you can do without the sheet reference all together, and so code like:
range("a1").value = 1
Will automatically work with a1 on the active sheet.
But with some code, like the autofiltermode property, sheet references are necessary. In this event, use:
Activesheet
Instead of a specific sheet reference (e.g., Sheets(1) ). Hope this helps.