OptionButton Property Disable

jeudi 5 mars 2015

Hi guys.



I have an option group or "frame", and inside I have 4 buttons (Option Buttons).



They are called:

opt_mtto

opt_elec

opt_qlty

opt_complete



So I was selecting the property of each button to Enable = False, so when my form load they will be Disabled. But, I didn't to be coding each button to enable each of the buttons, I though.. why wouldn't be better to say to the frame to be disable, so all inside would be disable.



So instead of going for each button, I return to my properties and enabled them again, but I disable my frame, so this made the same way, but only with 1 click :).



But I got a problem, when I click a button I want my frame get enabled so I code:



frame01.enabled = True



(This enabled all my buttons..)

But I only want 1 button Disable, in this case:



opt_mtto.enabled = false





so my code is:




Code:



frame01.enabled = true

opt_mtto.enabled = false



and this get me an error: 2101: "The setting you entered isn't valid for this property".



So I made this the other way, I enabled my frame, and then call the option button to be disable, and it works...



I only want to know why, I can't do this, the first way I mention.



I repeat is:

- When Form_Load the property are already set to the frame as False (no CODE, is set manually, in properties)



- When click button, enable Frame,

- Just after of enable the frame, disable one of the buttons inside.

- ERROR...



Why :(

OptionButton Property Disable

0 commentaires:

Enregistrer un commentaire

Labels