ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Deleting a textbox (https://www.excelbanter.com/excel-programming/405294-deleting-textbox.html)

Dr. Schwartz[_2_]

Deleting a textbox
 
I want to delete any (all) textboxes in the activesheet. This is what I have
got so far:

For Each Shapes.TextBox In ActiveSheet
.Delete
Next

Can anyone help me make this work?
Thanks
The Doctor

joel

Deleting a textbox
 
For Each Shp In ActiveSheet.shapes
.Delete
Next


"Dr. Schwartz" wrote:

I want to delete any (all) textboxes in the activesheet. This is what I have
got so far:

For Each Shapes.TextBox In ActiveSheet
.Delete
Next

Can anyone help me make this work?
Thanks
The Doctor


joel

Deleting a textbox
 
I left out a shp in my last posting

For Each Shp In ActiveSheet.Shapes
Shp.Delete
Next


"Dr. Schwartz" wrote:

I want to delete any (all) textboxes in the activesheet. This is what I have
got so far:

For Each Shapes.TextBox In ActiveSheet
.Delete
Next

Can anyone help me make this work?
Thanks
The Doctor


Don Guillett

Deleting a textbox
 
try this
Sub idtextbox()
For Each sh In ActiveSheet.Shapes
If sh.Type = 17 Then sh.Delete 'MsgBox sh.Name
Next
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Dr. Schwartz" wrote in message
...
I want to delete any (all) textboxes in the activesheet. This is what I
have
got so far:

For Each Shapes.TextBox In ActiveSheet
.Delete
Next

Can anyone help me make this work?
Thanks
The Doctor



Dr. Schwartz[_2_]

Deleting a textbox
 
Joel, I'm sure you meant well, but be aware that your suggestion here can
have serious consequenses. Please read the post: 'Validation list
functionality disappered' for details.

The doctor

"Joel" wrote:

I left out a shp in my last posting

For Each Shp In ActiveSheet.Shapes
Shp.Delete
Next


"Dr. Schwartz" wrote:

I want to delete any (all) textboxes in the activesheet. This is what I have
got so far:

For Each Shapes.TextBox In ActiveSheet
.Delete
Next

Can anyone help me make this work?
Thanks
The Doctor



All times are GMT +1. The time now is 07:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com