We help IT Professionals succeed at work.
Get Started

copy paste embedded shapes between hidden worksheets

Senechal asked
Last Modified: 2013-11-20

The code below has been implemented to:

1. delete existing OLE shapes from hidden worksheet 1
2. copy new OLE shapes from hidden worksheet 2
3. paste the copied shapes in hidden worksheet 1

The command button is on a worksheet 3, which is the only visible sheet to the user.

The code works fine for steps 1 and 2, but doesn't work for step 3 (pasting the shapes to hidden worksheet 1).

The code is as follows:

Private Sub CommandButton1_Click()

 ThisWorkbook.Worksheets("6").Shapes.Range(Array("1", "2", "3", "4", "5")).Delete

    ThisWorkbook.Worksheets("7").Shapes.Range(Array("1", "2", "3", "4", "5")).Select

End Sub

The answer appears so close - all help appreciated.
Watch Question
This problem has been solved!
Unlock 1 Answer and 8 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE