Solved

Excel with Hundreds of Invisible Text Boxes

Posted on 2013-01-27
3
311 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 IT Pros

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

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

628 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