I would struggle, because you use activecell, and I have no idea what I should change this to.

Show us your code that shows that error.