ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   deselect all option buttons in a frame (https://www.excelbanter.com/excel-programming/353734-deselect-all-option-buttons-frame.html)

mikewild2000[_30_]

deselect all option buttons in a frame
 

I'm half way there with this.

From the top.
I have the below code which tags the value of frame1 as row1, Ok so
far.
Now the bit i'm stuck at. Then i want to make all the optionbuttons in
frame1 false.


Dim MyMike
row1 = Val(Frame1.Tag)
If row1 < IsNull(MyMike) Then
row1 = False
End If


--
mikewild2000
------------------------------------------------------------------------
mikewild2000's Profile: http://www.excelforum.com/member.php...fo&userid=3276
View this thread: http://www.excelforum.com/showthread...hreadid=514129


Tom Ogilvy

deselect all option buttons in a frame
 
Dim ctrl as Control
for each ctrl in Userform1.Frame1.Controls
if typeof ctrl is MSForms.OptionButton then
ctrl.Value = False
end if
Next

IsNull doesn't test if a variable is empty. Use isEmpty


--
Regards,
Tom Ogilvy

"mikewild2000"
wrote in message
news:mikewild2000.23hbha_1140357001.3242@excelforu m-nospam.com...

I'm half way there with this.

From the top.
I have the below code which tags the value of frame1 as row1, Ok so
far.
Now the bit i'm stuck at. Then i want to make all the optionbuttons in
frame1 false.


Dim MyMike
row1 = Val(Frame1.Tag)
If row1 < IsNull(MyMike) Then
row1 = False
End If


--
mikewild2000
------------------------------------------------------------------------
mikewild2000's Profile:

http://www.excelforum.com/member.php...fo&userid=3276
View this thread: http://www.excelforum.com/showthread...hreadid=514129




mikewild2000[_31_]

deselect all option buttons in a frame
 

thank you tom for your expert help.

I never thought of that method.


--
mikewild2000
------------------------------------------------------------------------
mikewild2000's Profile: http://www.excelforum.com/member.php...fo&userid=3276
View this thread: http://www.excelforum.com/showthread...hreadid=514129



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com