VBA Excel – paste not working

5 pts.
Tags:
Excel 2007
Excel VBA
VBA
Visual Basic for Applications
I have the following piece of code attached to my Excel worksheet:

        ActiveSheet.Shapes("Object 407").Select         Selection.Copy         Range("BP106").Select         ActiveSheet.Paste The code is activated by making a choice in a drop down in the worksheet.  The worksheet is password protected but the cell BP106 is not locked.

When I make a selection from the drop down, the shape is not being pasted into BP106.  If I go to a new worksheet I can do a paste command and the shape is pasted.

If I put a breakpoint in the code, and manually step through the code, the shape is pasted into PB106 with no problem.

I can't figure out why it works when I manually step through the code but not when the code runs automatically.

How do I figure out what is wrong?

Thanks!



Software/Hardware used:
Excel 2007

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following