Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
UserForms: Clear all Option Buttons
I have a file that uses several userforms. These userforms have several
option buttons and check boxes on each. During "UserForm_Activate()" what code will clear all option buttons and check boxes at once? -- Thanks Shawn |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
UserForms: Clear all Option Buttons
This won't work?
Sub ClearOptButChBx() Dim usf As UserForm Dim OLEObj As OLEObject Set usf = ActiveUserForm For Each OLEObj In usf.OLEObjects If TypeOf OLEObj.Object Is MSForms.CheckBox Or TypeOf OLEObj.Object Is MSForms.OptionButton Then OLEObj.Object.Value = False End If Next OLEObj End Sub -- Thanks Shawn "Shawn" wrote: I have a file that uses several userforms. These userforms have several option buttons and check boxes on each. During "UserForm_Activate()" what code will clear all option buttons and check boxes at once? -- Thanks Shawn |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
UserForms: Clear all Option Buttons
Instead of setting the userform to "hide" I "unload" it. That seems to do
the trick. -- Thanks Shawn "Shawn" wrote: This won't work? Sub ClearOptButChBx() Dim usf As UserForm Dim OLEObj As OLEObject Set usf = ActiveUserForm For Each OLEObj In usf.OLEObjects If TypeOf OLEObj.Object Is MSForms.CheckBox Or TypeOf OLEObj.Object Is MSForms.OptionButton Then OLEObj.Object.Value = False End If Next OLEObj End Sub -- Thanks Shawn "Shawn" wrote: I have a file that uses several userforms. These userforms have several option buttons and check boxes on each. During "UserForm_Activate()" what code will clear all option buttons and check boxes at once? -- Thanks Shawn |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
clear option buttons **MACRO TWEAK** | Excel Programming | |||
Option buttons: How to get the selected option from a group? | Excel Programming | |||
Userforms submit button to clear after it enters data? | Excel Programming | |||
Navigating between option buttons is not selecting the option | Excel Programming | |||
Navigating between option buttons is not selecting the option | Excel Programming |