Deleteing Pictures

O

oceankayakjim

Hi

I am using Excel 2003 and have a question about Pictures. I have been given
a Excel file to maintain for daily meetings. The problem is that it is full
of "Picture Boxes". These Boxes are empty, but they take up space and slow
the file to a crawl. I have gone in and manualy deleted all the "Picture
Boxes" that I can find. The file is now 87.6% smaller. I am sure that there
are more "Picture Boxes". Is there a way to find them without fishing?
 
D

Don Guillett

Sub eachshape()
For Each sh In Sheets("yoursheetnamehere").Shapes
MsgBox sh.Name
MsgBox sh.TopLeftCell.Address

'sh.cut ' to delete automatically

Next sh

End Sub
 
O

oceankayakjim

Thanks!

I'm a bit new to Excel, (I'm a misplaced Mechical Engineer), I'll show this
to the IT department here and see if they can help me with this.
 
K

Ken Wright

Edit / Go To / Special / Objects - Then hit the delete button

Regards
Ken.............................
 
J

JLatham

For future reference, to insert a regular Sub or Function into a workbook:

Open the workbook and press [Alt]+[F11] which will open the Visual Basic
Editor (VBE).
In the VBE, use its menu to Insert --> Module and then copy the code
provided and paste it into the empty code module presented to you. You may
need to make changes to the code for your unique workbook/worksheet setup;
the code provider should point that out to you.

At that point it's ready to be used via Tools --> Macro --> Macros from the
regular Excel menu.

Subs that start with
Sub Worksheet_??????
or
Sub Workbook_?????
(where ????? are some more words) have to go into other areas of the .xls
file. But what I explained above will work with most Sub and Function code
segments provided here.
 
O

oceankayakjim

Thanks to everyone.

You have helped me bring a file from 4,397KB down to 164KB.
This decrease in size has resulted in an increase in speed.
All the Production Supervisors are thrilled. Waiting for this report has
been an on going problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top