Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cycle through all Checkboxes on a worksheet
I would like to create a macro that will find all the checkbox controls (they
are all directX) on a worksheet and then check each one. If it is checked, I would like it to run a macro with a name identical to the caption on the checkbox. How would I go about searching for checkboxes and compsosing a list of them? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cycle through all Checkboxes on a worksheet
Something like this perhaps...
Sub FindCheckboxes() Dim obj As OLEObject For Each obj In OLEObjects If TypeOf obj.Object Is msforms.CheckBox Then If obj.Object.Value = True Then Application.Run obj.Object.Caption End If Next obj End Sub -- HTH... Jim Thomlinson "the00snoopy" wrote: I would like to create a macro that will find all the checkbox controls (they are all directX) on a worksheet and then check each one. If it is checked, I would like it to run a macro with a name identical to the caption on the checkbox. How would I go about searching for checkboxes and compsosing a list of them? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I keep result from 1 iteration cycle to use in next cycle? | Excel Discussion (Misc queries) | |||
Looping Checkboxes on Worksheet | Excel Programming | |||
Generalising macro 2 cycle thru checkboxes in frames/pages on User | Excel Programming | |||
Checkboxes on a Shared Worksheet! | Excel Programming | |||
Looping checkboxes embedded in worksheet | Excel Programming |