Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Manipulating Controls on a worksheet

I have checkboxes on a worksheet from the Forms tool bar. The checkboxes are
in a named range on the sheet.

I want to loop through these checkboxes (the ones in the named range only)
and delete the ones that are checked along with the row that it sits on. I
would also like to do the reverse i.e. delete all of the ones that are not
checked.


I have made a ShapeRange and can loop through them but I can't figure out
how to manipulate them.


Thanks

using excel 2003


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 380
Default Manipulating Controls on a worksheet

Looping through them is simple

For each cb In ACtivesheet.Checkboxes
Msgbox cb.Name
Next cb

But, controls do not sit in a named range, they are on a separate layer, so
you can't test if they are in that range. You could test the topleftcell
property for being in the range,

Dim cb As CheckBox

For Each cb In ActiveSheet.CheckBoxes
If Not Intersect(Range("rng"), cb.TopLeftCell) Is Nothing Then
MsgBox cb.Name
End If
Next cb


--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"David Looney" wrote in message
...
I have checkboxes on a worksheet from the Forms tool bar. The checkboxes

are
in a named range on the sheet.

I want to loop through these checkboxes (the ones in the named range only)
and delete the ones that are checked along with the row that it sits on. I
would also like to do the reverse i.e. delete all of the ones that are not
checked.


I have made a ShapeRange and can loop through them but I can't figure out
how to manipulate them.


Thanks

using excel 2003




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems manipulating a EXCEL Worksheet based on a SharePoint List Daniel Excel Programming 1 March 15th 06 12:46 PM
creating/manipulating form controls placed on a spreadsheet in excel using vba [email protected] Excel Programming 2 August 15th 05 02:07 AM
Controls in a Worksheet Jeff Excel Programming 4 July 11th 05 11:59 PM
Controls on worksheet gr8guy Excel Programming 1 May 1st 04 03:11 AM
controls on worksheet jim c. Excel Programming 3 February 9th 04 06:43 PM


All times are GMT +1. The time now is 07:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"