Delete text boxes within a selection area

Geojim

New Member
Joined
Sep 14, 2013
Messages
4
Greetings,

Hopefully the title says it all. I'd like to be able to select a range of cells which has text boxes super imposed on it, and delete those text boxes. I can't find anything, is it possible? I'm using excel 2010 on a xlsm file.

Cheers,
Geojim
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
They are copies of other text boxes in the document. The file was originally a .xls if that helps date it. Are there different types of textbox?
 
Upvote 0
Try:

Code:
Sub Test()
    Dim TB As TextBox
    With ActiveSheet
        For Each TB In .TextBoxes
            If Not Application.Intersect(TB.TopLeftCell, Selection) Is Nothing Then
                TB.Delete
            End If
        Next TB
    End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,679
Messages
6,126,186
Members
449,296
Latest member
tinneytwin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top