Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default changing button colour


can any1 change the button colour. how do you do it?


--
mamun316
------------------------------------------------------------------------
mamun316's Profile: http://www.excelforum.com/member.php...o&userid=28626
View this thread: http://www.excelforum.com/showthread...hreadid=492497

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default changing button colour


Hello Mamun316,

If your button is a Forms Button the answer is no you can't change the
color. If your button is a Control Toolbox CommandButton the answer is
yes.

EXAMPLE:

CommandButton1.BackColor = vbYellow

The BackColor property uses a RGB (Red Green Blue) color value. This is
a Long Integer that represents the colors Red, Blue, and Green that
combine to make the color. VBA also has preset color constants you can
use like vbBlack, vbRed, vbWhite, vbGreen, etc. The default color of a
button is vbButtonFace.

EXAMPLE OF RGB FUNCTION):

(Red)
MyColor = RGB(255, 0, 0)

(Bright Green)
MyColor = RGB(0, 255, 0)

(Dark Blue)
MyColor = RGB(0, 0, 255)

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=492497

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
Changing background colour when changing data in a cell Paoul Excel Discussion (Misc queries) 7 December 26th 08 07:25 AM
Changing all cells in one colour to a different colour Bob Excel Discussion (Misc queries) 3 June 25th 08 02:12 PM
Changing the colour of text packfan Excel Discussion (Misc queries) 1 November 27th 06 04:41 AM
Button colour ExcelMonkey[_190_] Excel Programming 4 March 21st 05 11:38 AM
Colour Button Hank Scorpio Excel Programming 0 August 10th 03 11:03 AM


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

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

About Us

"It's about Microsoft Excel"