View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default Change color of radio button caption if selected

One way is to put the code below behind the OptionButton. It uses
OptionButton1 but you can change it to suit you needs.

Private Sub OptionButton1_GotFocus()
OptionButton1.ForeColor = vbRed
End Sub
Private Sub OptionButton1_LostFocus()
OptionButton1.ForeColor = vbBlack
End Sub

When the control is clicked the font and radio dial area will turn red. When
something else takes focus, the font and radio dial will turn black. Since
you didn't mention where the control is located, sheet or form, I assume it
is from the control tool box. If not, this code is useless. To access the
code window, enter design mode and either double click the OptionButton for
direct access or right click it and then click View Code in the pop up menu.
Paste the above code into the code window.

"HH" wrote:

I would like the caption font color of a radio button in a group to change
from black to red when selected.
Is that possible and HOW?
Hank