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.
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!