Thanks, Opus

Yes, that was the problem. I copied this part of my macro to another module and like you identified the error - named it "Pivot Table"