Excel spreadsheet is corrupted with multiple text boxes?

J

Jim_C

I have a Excel spreadsheet that I use for scheduling. I have a problem with
multiple (empty) text boxes appearing over multiple cells in the spreadsheet.
Is this a bug? What is a quicker way to delete all of the unwanted text box
frames? At present, I am selecting the box, hitting the 'Delete' key and
then selecting the box directly underneath. There are up to 50 text box
frames piled one on top of the other that I am deleting individually!
 
G

Gary''s Student

If the only Shapes on your worksheet are these unwanted Text Boxes, then try
this tiny macro:

Sub CleanUp()
Dim s As Shape
For Each s In ActiveSheet.Shapes
s.Delete
Next
End Sub



Macros are very easy to install and use:

1. ALT-F11 brings up the VBE window
2. ALT-I
ALT-M opens a fresh module
3. paste the stuff in and close the VBE window

If you save the workbook, the macro will be saved with it.

To use the macro from the normal Excel window:

1. ALT-F8
2. Select the macro
3. Touch Run



To remove the macro:

1. bring up the VBE window as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm
 

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