Re: Colour OptionButtons on initialize and change by snafu
snafu
Tue Mar 13 08:19:54 CDT 2007
My apologies for any confusion.
This is a userform, no internet is invovled with this.
The form has 8 frames, 6 of the frames have 2 to 5 option buttons, 2
of the frames use togglebuttons, there are about a dozen textboxes,
and 4 command buttons.
The command buttons have to be colour coded, the text boxes should be
coloured, and it would be nice to have colour associated with the
option buttons.
Below is an example for one of the frames followed by an example of
the startup code I'm using.
I'm just looking for a slicker way to get the option buttons to change
their backcolor value and font size.
So that whenever an option button gets clicked and also at startup the
various option buttons evaluate if they are set to true or false.
if false do one action, if true do an different one. I don't want the
togglebuttons to do this, nor any other modification to the rest of
the form.
Also, is there a way to have a button's backcolor automatically pickup
the form backcolor?
Thanks again.
Private Sub IFR_Click()
Me.IFR.BackColor = &HC000& 'GREEN
Me.IFR.Font.Size = 12
Me.VFR.BackColor = &HFFFFC0 'Lt Blue
Me.VFR.Font.Size = 10
End Sub
Private Sub VFR_Click()
Me.VFR.BackColor = &HC000& 'GREEN
Me.VFR.Font.Size = 12
Me.IFR.BackColor = &HFFFFC0 'Lt Blue
Me.IFR.Font.Size = 10
End Sub
Sub ExerciseBuilderInterface()
ExerciseBuilderForm.Show
ExerciseBuilderForm.IFR.BackColor = &HC000& 'GREEN
ExerciseBuilderForm.IFR.Font.Size = 12
End Sub