Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Changing background colour when changing data in a cell | Excel Discussion (Misc queries) | |||
Changing all cells in one colour to a different colour | Excel Discussion (Misc queries) | |||
Changing the colour of text | Excel Discussion (Misc queries) | |||
Button colour | Excel Programming | |||
Colour Button | Excel Programming |