PC Review


Reply
Thread Tools Rate Thread

Color of Buttons

 
 
TotallyConfused
Guest
Posts: n/a
 
      1st Dec 2007
Is there any way you can change the color of buttons on a User Form in Excel?
or a way to highlight the button when using it? If so how? I can't find
anything on how to do this. Can someone please help? Thank you in advance
for any help you can provide.
 
Reply With Quote
 
 
 
 
excelent
Guest
Posts: n/a
 
      1st Dec 2007
In Properties > Back color

"TotallyConfused" skrev:

> Is there any way you can change the color of buttons on a User Form in Excel?
> or a way to highlight the button when using it? If so how? I can't find
> anything on how to do this. Can someone please help? Thank you in advance
> for any help you can provide.

 
Reply With Quote
 
JLGWhiz
Guest
Posts: n/a
 
      1st Dec 2007
If the button is from the Control Toolbox, you can change the color by
opening the properties menu and using the Backcolor for the button face color
and Forecolor for the caption color.

"TotallyConfused" wrote:

> Is there any way you can change the color of buttons on a User Form in Excel?
> or a way to highlight the button when using it? If so how? I can't find
> anything on how to do this. Can someone please help? Thank you in advance
> for any help you can provide.

 
Reply With Quote
 
OssieMac
Guest
Posts: n/a
 
      1st Dec 2007
I see that you have answers to actually set the color in properties but you
also asked 'a way to highlight the button when using it'. The following code
will toggle the background color of the button between red and yellow each
time it is clicked.

Private Sub CommandButton1_Click()
If Me.CommandButton1.BackColor = &HFF& Then 'Red
Me.CommandButton1.BackColor = &HFFFF& 'Yellow
Else
Me.CommandButton1.BackColor = &HFF& 'Red
End If
End Sub

The codes for the color can be obtained from the properties dialog box. When
you select the Palet tab for the color and change the color, you will see the
code appear on the line. If you enter the entire number in VBA with the
leading zeros after the H (Hex) then VBA removes them.


--
Regards,

OssieMac


"TotallyConfused" wrote:

> Is there any way you can change the color of buttons on a User Form in Excel?
> or a way to highlight the button when using it? If so how? I can't find
> anything on how to do this. Can someone please help? Thank you in advance
> for any help you can provide.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where are the buttons and the color? Mel Microsoft Outlook Discussion 1 14th Mar 2008 03:35 PM
Interactive Buttons - Color =?Utf-8?B?Qm9iYmk=?= Microsoft Frontpage 4 29th Jul 2006 09:17 AM
changing the color of the buttons =?Utf-8?B?TXIuIFY=?= Microsoft Excel Misc 4 5th Apr 2005 02:57 PM
Re: Buttons Color Peter De Baets Microsoft Access Forms 0 9th Aug 2003 06:51 PM
Re: Buttons Color Stanko Milosev Microsoft Access Forms 0 6th Aug 2003 06:39 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:07 PM.