LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default Changing BackColor of ToggleButton produces a muddy grey color

I have a ToggleButton on a worksheet in a project I'm developing for a
cricket scorebook. I'd like it to change colour when pressed. This is my
code:

Private Sub togNoBall_Click()
With togNoBall
'when not pressed
If .Value = False Then
.BackColor = &H8000000F 'grey = default button colour
End If
'when pressed
If .Value = True Then
.BackColor = RGB(255, 0, 0) 'bright red
'[I shall eventually put some other code in here, to fire up the
No Ball Userform]
End If
End With
End Sub

I want it to change to red when clicked, and back to grey when "unclicked"
(or not clicked at all). The problem is, it does change colour, but not to
the bright, solid, vivid red that I'd expect. It changes to a sort of pink -
like if the red is mixed with grey. When it is clicked (and is the pink/grey
colour), and I then click on it again, before it changes back to grey, but
while the click is held down, it does change to the red colour I'd like it
to be, when clicked. A similar thing happens when I use other colours.

Is this due to some Windows appearance setting on my PC, outside of Excel?

Thanks

Ian

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Text colour keeps changing to grey SarahM Excel Discussion (Misc queries) 0 March 12th 10 12:26 PM
Changing the backcolor of a cell when data is added OldPoplarPete Excel Discussion (Misc queries) 1 February 18th 10 09:50 PM
Changing BackColor on Command Buttons? RBee Excel Discussion (Misc queries) 1 August 30th 06 02:32 AM
Grey Color pcw[_2_] Excel Programming 2 June 24th 04 06:07 PM
Changing backcolor of commandbutton scottnshelly[_21_] Excel Programming 2 April 22nd 04 11:27 PM


All times are GMT +1. The time now is 01:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"