Toggle Button Format Options

J

JAD

I would like to have more control over the look of a toggle button. At this
point, I have opened and modified items in the Property window only. When the
toggle is depressed, the background color turns black while the font turns
white. When the toggle button is shown as raised, I get a light grid system
over top of the fore mentioned background and font colors. Although I would
like to know all the modifications I can do through VBA on the appearance of
a toggle button, the one change I would like more details on, at this point,
is how to get rid of the grid and replace it with a color change on both
background and font. If you can include any additional changes that I can
use, that would be a bonus. Any help would be appreciated. Thank You, JAD
 
R

RyanH

Try checking the BackStyle Property and make sure it is opague. Here is code
that I use for changing the color of a toggle button. Where is the toggle
located a UserForm or Worksheet?

Private Sub tgbStandard_Click()

'changes backcolor and caption of toggle button
If ToggleButton = False Then
With ToggleButton
.Caption = "Manual Off"
.BackColor = vbButtonFace
End With
Else
With ToggleButton
.Caption = "Manual On"
.BackColor = &HC0FFFF 'yellow
End With
End If

End Sub

Hope this helps! If so, let me know and click "YES" below.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top