Solved

Delete specific embeded object in excel 2010

Posted on 2014-03-26
2
293 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
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now