Solved

Delete specific embeded object in excel 2010

Posted on 2014-03-26
2
302 Views
Last Modified: 2014-03-26
Guys

I want to be able to delete all embedded objects except a specific object on an excel spreadsheet. At the moment I have a logo at the top and my code deletes all objects including the logo and I don't want this.

can you help

the embedded object I want to keep is  "Object 34"

I use this at the moment but it deletes everything

 Wbo.Sheets("Design Request Form").OLEObjects.Delete

Regards
0
Comment
Question by:DarrenJackson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 500 total points
ID: 39955601
You'll need to loop - like this:

Dim oOLE as OLEObject
For each oOLE in Wbo.Sheets("Design Request Form").OLEObjects
If oOLE.Name <> "Object 34" then oOLE.Delete
Next oOLE

Open in new window

0
 

Author Closing Comment

by:DarrenJackson
ID: 39955642
great thanks for the quick response
0

Featured Post

Create Professional Looking Email Signatures

Create "Professional HTML Email Signatures" with ease.
7 Day Money Back Guarantee if not 100% Satisfied.
Affordable - Try it out for 7 Days Totally Risk Free.
Installers provided for over 45 Email clients.
Both Windows & MAC Supported.
Highly Recommended!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
The advancement in technology has been a great source of betterment and empowerment for the human race, Nevertheless, this is not to say that technology doesn’t have any problems. We are bombarded with constant distractions, whether as an overload o…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question