PC Review


Reply
Thread Tools Rate Thread

Deleting a textbox

 
 
Dr. Schwartz
Guest
Posts: n/a
 
      30th Jan 2008
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
 
Reply With Quote
 
 
 
 
Joel
Guest
Posts: n/a
 
      30th Jan 2008
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

 
Reply With Quote
 
Joel
Guest
Posts: n/a
 
      30th Jan 2008
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

 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      30th Jan 2008
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
(E-Mail Removed)
"Dr. Schwartz" <(E-Mail Removed)> wrote in message
news:23730436-76C4-434A-BFDE-(E-Mail Removed)...
>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


 
Reply With Quote
 
Dr. Schwartz
Guest
Posts: n/a
 
      31st Jan 2008
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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get rid of a label without deleting its textbox? =?Utf-8?B?U01vZWxsZXI=?= Microsoft Access 11 2nd Oct 2007 09:01 PM
Deleting value in TextBox with SpinButton attached markb Microsoft Excel Programming 8 3rd Mar 2007 10:45 PM
Assign Null to textbox after deleting its content Arend Jan Microsoft ADO .NET 1 14th Aug 2006 05:44 PM
Deleting a textbox control at runtime Grant Williams Microsoft Excel Programming 6 14th Jun 2004 08:33 AM
deleting a line from a multiline textbox Harry Hudini Microsoft VB .NET 2 3rd Nov 2003 10:26 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:03 PM.