ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Follow up on this (https://www.excelbanter.com/excel-programming/295262-follow-up.html)

steve

Follow up on this
 
Tom O: Gave me this code from earlier today. However I still need some help on this. The code that he gave me works great but it does not clear the optionbuttons until the user clicks ok so they never see it. I need them to see it. So how do I make this happen on the "fly" If the checkbox is false then the optionbuttons should be false, null not checked. This of course is all in a userform. TIA and thanks again To

With Me.checkboxJ
If Me.checkboxJL.value = True The
strJL = "JL
Me.Frame1.OptionButton1.Enabled = Tru
Me.Frame1.OptionButton2.Enabled = Tru
Els

Me.Frame1.OptionButton1.Value = Fals
Me.Frame1.OptionButton2.Value = Fals
Me.Frame1.OptionButton1.Enabled = Fals
Me.Frame1.OptionButton2.Enabled = Fals
End I
End Wit

--
Regards
Tom Ogilv


I have checkboxJL if it is on it has a value of JL. I then have

optionbuttons that are used also. If the checkbox is flase I want to mak
sure that the user cannot click and turn on either one of the optionbuttons
the optionsbuttons are within a frame. Currently right now the user coul
turn on one of the option buttons weather the checkbox is true or false. Ho
do you code to make this happen? TI
With Me.checkboxJ

If Me.checkboxJL.value = True The
strJL = "JL
Els
Me.checkboxJL = Fals
End I
End Wit
If obReqJL = True Then strJLtype = Require
If obOptJL = True Then strJLtype = Optiona


Jenn

Follow up on this
 
Steve

I am not exactly sure what you want to happen, but I think you have 2 options. If the optionbutton is disabled the button is grayed out or you should explore setting the triplestate property. When the triplestate property is set correctly the optionbutton can have a null value

Jenn

steve

Follow up on this
 
Jenn,
That sounds correct to me. So if the checkbox is false then the optionsbuttons stay grayed out correct? If that is the case then that is what I want to do. However I have never used a triple state and do not know how this is done. If you could help me out that would be great.

TIA

----- Jenn wrote: -----

Steve,

I am not exactly sure what you want to happen, but I think you have 2 options. If the optionbutton is disabled the button is grayed out or you should explore setting the triplestate property. When the triplestate property is set correctly the optionbutton can have a null value.

Jenn

Kevin Beckham

Follow up on this
 
Tom's code should be in a subroutine named
checkboxJL_Change

On the form, select the checkbox, right-click and select
View Code then select Change method instead of the default
Click method

Kevin Beckham

-----Original Message-----
Jenn,
That sounds correct to me. So if the checkbox is false

then the optionsbuttons stay grayed out correct? If that
is the case then that is what I want to do. However I have
never used a triple state and do not know how this is
done. If you could help me out that would be great.

TIA

----- Jenn wrote: -----

Steve,

I am not exactly sure what you want to happen, but I

think you have 2 options. If the optionbutton is disabled
the button is grayed out or you should explore setting the
triplestate property. When the triplestate property is set
correctly the optionbutton can have a null value.

Jenn
.



All times are GMT +1. The time now is 11:29 PM.

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