Fordraiders
asked on
check for an option box being selected on a spefic page
office 2010 excel vba
userform with mutlipage object and 10 "Pages"
I have code that will for any optionbutton being selected on a multipage object.
Dim cCont As Control
For Each cCont In Me.Controls
If TypeName(cCont) = "optionbutton" Then
cCont.Value = False
End If
Next cCont
I need the code revised to specifically lokk at "Page" like "page1"
Then if any optionbutton selected = true then
do something..
Dim cCont As Control
For Each cCont In Me.Controls
If TypeName(cCont) = "optionbutton" Then
' do something here...
End If
Next cCont
Thanks
fordraiders
userform with mutlipage object and 10 "Pages"
I have code that will for any optionbutton being selected on a multipage object.
Dim cCont As Control
For Each cCont In Me.Controls
If TypeName(cCont) = "optionbutton" Then
cCont.Value = False
End If
Next cCont
I need the code revised to specifically lokk at "Page" like "page1"
Then if any optionbutton selected = true then
do something..
Dim cCont As Control
For Each cCont In Me.Controls
If TypeName(cCont) = "optionbutton" Then
' do something here...
End If
Next cCont
Thanks
fordraiders
It looks like the code you posted is in a UserForm. Correct? Are you saying that you want to modify that code to look for controls on a sheet named 'Page1'?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Thanks
You're welcome and I'm glad I could help.
Marty - MVP 2009 to 2012
Marty - MVP 2009 to 2012