Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
John Davies
 
Posts: n/a
Default toggle button text color

is it possible to change the text color of a toggle button text depending
whether the toggle button value is true or false
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

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


John Davies wrote:

is it possible to change the text color of a toggle button text depending
whether the toggle button value is true or false


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
keithl816
 
Posts: n/a
Default toggle button text color


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


--
keithl816
------------------------------------------------------------------------
keithl816's Profile: http://www.excelforum.com/member.php...o&userid=21287
View this thread: http://www.excelforum.com/showthread...hreadid=393822

  #4   Report Post  
Posted to microsoft.public.excel.misc
Peo Sjoblom
 
Posts: n/a
Default toggle button text color

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

--

Regards,

Peo Sjoblom


"keithl816" wrote
in message ...

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


--
keithl816
------------------------------------------------------------------------
keithl816's Profile:

http://www.excelforum.com/member.php...o&userid=21287
View this thread: http://www.excelforum.com/showthread...hreadid=393822



  #5   Report Post  
Posted to microsoft.public.excel.misc
keithl816
 
Posts: n/a
Default toggle button text color


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


--
keithl816
------------------------------------------------------------------------
keithl816's Profile: http://www.excelforum.com/member.php...o&userid=21287
View this thread: http://www.excelforum.com/showthread...hreadid=393822



  #6   Report Post  
Posted to microsoft.public.excel.misc
keithl816
 
Posts: n/a
Default toggle button text color


I figured it out.

Thanks


Code:
--------------------

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

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



Larry


--
keithl816
------------------------------------------------------------------------
keithl816's Profile: http://www.excelforum.com/member.php...o&userid=21287
View this thread: http://www.excelforum.com/showthread...hreadid=393822

Reply
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
Formula that tests text color Alan Armstrong Excel Discussion (Misc queries) 6 June 3rd 05 11:40 PM
Quick way to sort lists by text color? PokerZan Excel Discussion (Misc queries) 3 June 3rd 05 01:09 AM
Shortcut for FILL COLOR and COLOR TEXT UABCSA Excel Discussion (Misc queries) 1 May 27th 05 10:01 PM
Searching based on Text color EbonyMonarch Excel Worksheet Functions 1 February 15th 05 02:51 PM
Toggle betwen "editing" and "pushing" a button in excel brjohnson9 Excel Discussion (Misc queries) 1 December 9th 04 12:02 AM


All times are GMT +1. The time now is 03:06 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"