Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Norman provided the following code which resets the checkboxes from the Forms
Toolbar. Can someone amend this for me to apply to checkboxes from the Control Tool Box Public Sub Tester() ActiveSheet.CheckBoxes.Value = xlOff End Sub Thank you -- Robert |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Robert,
Try: '============= Public Sub Tester() Dim obj As OLEObject For Each obj In ActiveSheet.OLEObjects If TypeOf obj.Object Is MsForms.CheckBox Then obj.Object.Value = False End If Next obj End Sub '<<============= --- Regards, Norman "Robert" wrote in message ... Norman provided the following code which resets the checkboxes from the Forms Toolbar. Can someone amend this for me to apply to checkboxes from the Control Tool Box Public Sub Tester() ActiveSheet.CheckBoxes.Value = xlOff End Sub Thank you -- Robert |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you Norman,
-- Robert |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, Norman, I had attached macros to the CheckBoxes. When the Reset
Macro is executed, the individual macros attached to the CheckBoxes are being activated aswell. Is there a way to prevent the underlying macros from being executed. Thank you. -- Robert |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Robert,
Hi, Norman, I had attached macros to the CheckBoxes. When the Reset Macro is executed, the individual macros attached to the CheckBoxes are being activated aswell. Is there a way to prevent the underlying macros from being executed. Try: '============= Public Sub Tester() Dim obj As OLEObject Dim Cbox As MsForms.CheckBox Application.EnableEvents = False For Each obj In ActiveSheet.OLEObjects If TypeOf obj.Object Is MsForms.CheckBox Then obj.Object.Value = False End If Next obj Application.EnableEvents = True End Sub '<<============= --- Regards, Norman |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
No luck, Norman, problem persists. Any further response
will be followed up by me in 14 hours time. Anyway, thank you for your effort. I shall continue to look out. -- Robert " |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try something like this:
'at the top of the General module Option explicit Public BlkProc as boolean Public Sub Tester() Dim obj As OLEObject Dim Cbox As MsForms.CheckBox blkproc = true For Each obj In ActiveSheet.OLEObjects If TypeOf obj.Object Is MsForms.CheckBox Then obj.Object.Value = False End If Next obj blkproc = false End Sub Then for each checkbox, you'll have to check the status of the boolean. Private Sub CheckBox1_Click() if blkproc = true then exit sub 'rest of your code here End Sub Robert wrote: Hi, Norman, I had attached macros to the CheckBoxes. When the Reset Macro is executed, the individual macros attached to the CheckBoxes are being activated aswell. Is there a way to prevent the underlying macros from being executed. Thank you. -- Robert -- Dave Peterson |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yes,Yes,Yes that did it. Thank you Dave.
Thanks to Norman too. -- Robert |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I add a control check box to control other checkboxes? | Excel Worksheet Functions | |||
CheckBoxes: How to reset | Excel Discussion (Misc queries) | |||
creating checkboxes from forms tool bar | Excel Worksheet Functions | |||
Tool Tip Text for Form control/ Active-X control | Excel Programming | |||
Forms control checkboxes on charts | Excel Programming |