Probably best to paste it in a module created by right clicking on'VBAProject(YourFileName)' in the Project Explorer pane of the VBEditor, choosing 'insert...', then choosing 'Module'.