Yes, my bad. I should have read the description more closely.

Does removing the End sub from your routine help.