Solved

Excel with Hundreds of Invisible Text Boxes

Posted on 2013-01-27
3
308 Views
Last Modified: 2013-02-18
Hello,

I'm troubleshooting a very slow Excel spreadsheets.  It's a 1 worksheet workbook, with only one page of data.

When I go to the "Page Layout" -> Selection Pane, I see hundreds of text boxes.  When I click on one of them, nothing appears/dissappears.  If I randomly click somewhere on the page, I might click on one of these text boxes, which draws a border around it until it loses focus.

Is there anyway to delete all of these items at once?  I have not idea what caused them to be created in the first place.  

Thanks for any advice
0
Comment
Question by:compsol1993
[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
3 Comments
 
LVL 26

Accepted Solution

by:
redmondb earned 500 total points
ID: 38825209
Hi, compsol1993.

This is a problem I've seen here a number of times. The macro below will delete all Shapes in the current sheet. (ListBoxes are one type of Shape.)
Sub Delete_All_Shapes()
Dim xResponse As Long
Dim xShape    As Shape

If ActiveSheet.Shapes.count = 0 Then
    MsgBox ("No Shapes in the current sheet. Run cancelled.")
    Exit Sub
End If

xResponse = MsgBox("About to delete all of the current sheet's Shapes. [" & ActiveSheet.Shapes.count & "]" & Chr(10) _
                                & "('OK' to continue, 'Cancel' to quit.)", vbOKCancel, "Delete All Shapes")
If xResponse = 2 Then Exit Sub

For Each xShape In ActiveSheet.Shapes

    xShape.Delete
    
Next

End Sub

Open in new window

Regards,
Brian.
0
 

Author Closing Comment

by:compsol1993
ID: 38903098
Perfect!  Thanks for the help
0
 
LVL 26

Expert Comment

by:redmondb
ID: 38903337
Thanks, compsol1993.
0

Featured Post

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

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.
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!
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

728 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