toggle button text color

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

is it possible to change the text color of a toggle button text depending
whether the toggle button value is true or false
 
This worked ok for me:

Option Explicit
Private Sub ToggleButton1_Click()
With Me.ToggleButton1
If .Value = True Then
.ForeColor = &H8000000D
Else
.ForeColor = &HFF&
End If
End With
End Sub
 
How can this be changed so that when the button is out it is black and
when it is pushed in it is red?

Larry
 
Don't think that's possible, you can change the text colour in the button's
properties but I don't know of a way to have 2 different colours
 
Daves code works but the font in the button comes up green, what needs
to be changed so that it is black instead of green? I've changed the
true to false so that the red shows up when ther button is pushed in,
when it's out it is green.

CODE]
If .Value = True Then
..ForeColor = &H8000000D
Else
..ForeColor = &HFF&
End If

--------------------


Thanks

Larry
 
I figured it out.

Thanks


Code
-------------------

With Me.ToggleButton1
If .Value = False Then
.ForeColor = &H0
Else
.ForeColor = &HFF&
End If
End With
 
Back
Top