Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > microsoft.public.excel.programming > #110053
| From | Claus Busch <claus_busch@t-online.de> |
|---|---|
| Newsgroups | microsoft.public.excel.programming |
| Subject | Re: Delete CheckBoxes |
| Date | 2017-05-30 12:18 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <ogjgms$fos$1@dont-email.me> (permalink) |
| References | <a34c5ee8-1002-4fae-9c5e-282b5984bfa4@googlegroups.com> <ogj1av$la2$1@dont-email.me> <67277680-2d93-4e49-884c-d84fbcece666@googlegroups.com> |
Hi Howard,
Am Tue, 30 May 2017 02:29:11 -0700 (PDT) schrieb L. Howard:
> Strange way to set the range, I must say.
>
> Is there a way to have the range limited to say columns D, E, F between rows 10 and 20.
>
> Where you have to define all four sides of the range, top, bottom, left and right?
>
> I tried to set a selected range to a variable and act on the variable to delete the boxes but could not get that to work.
controls are elements of a sheet (children of a sheet) and not elements
of a range.
If you want to delete controls in a specific range you have to call them
as shapes and check the top and the left property of the shapes.
Try:
Sub DeleteChB()
Dim shp As Shape
For Each shp In ActiveSheet.Shapes
If shp.Left > Columns(3).Left And shp.Left < Columns(7).Left _
And shp.Top > Rows(10).Top And shp.Top < Rows(21).Top Then
shp.Delete
End If
Next
End Sub
Regards
Claus B.
--
Windows10
Office 2016
Back to microsoft.public.excel.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Delete CheckBoxes "L. Howard" <lhkittle@comcast.net> - 2017-05-29 22:23 -0700
Re: Delete CheckBoxes Claus Busch <claus_busch@t-online.de> - 2017-05-30 07:56 +0200
Re: Delete CheckBoxes "L. Howard" <lhkittle@comcast.net> - 2017-05-30 02:29 -0700
Re: Delete CheckBoxes Claus Busch <claus_busch@t-online.de> - 2017-05-30 12:18 +0200
Re: Delete CheckBoxes "L. Howard" <lhkittle@comcast.net> - 2017-05-30 09:15 -0700
Re: Delete CheckBoxes GS <gs@v.invalid> - 2017-05-30 11:41 -0400
Re: Delete CheckBoxes "L. Howard" <lhkittle@comcast.net> - 2017-05-30 09:27 -0700
Re: Delete CheckBoxes GS <gs@v.invalid> - 2017-05-30 12:33 -0400
Re: Delete CheckBoxes "L. Howard" <lhkittle@comcast.net> - 2017-05-30 14:46 -0700
csiph-web