ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Add fill colors: green & red & yellow on toolbar, instead clickin. (https://www.excelbanter.com/excel-worksheet-functions/18290-add-fill-colors-green-red-yellow-toolbar-instead-clickin.html)

moekan

Add fill colors: green & red & yellow on toolbar, instead clickin.
 
I want to add different colors on toolbar to fill cell color. Not having to
click on fill color box on toolbar to color cell each time.


hi,
create three macros, 1 for each color
Sub macgetcolor()
Selection.Interior.ColorIndex = 5
End Sub
red = 5
green = 4
yellow = 6
Put an macro icon up for each color and assign 1 of the
macro to each icon. modify the icon to reflect the color.
if you don't like those colors then in a blank workbook
paste and run this code. it will show you all of the
colors in excel and their indexes.
Sub macGetColors()
' Macro written 2/10/02 by FSt1

Sheets("Sheet1").Select
Range("B2").Select
Set ci = Range("A1")
ci.Value = 1
Set c = Range("B2")
Do Until ci 56
Set c2 = c.Offset(1, 0)
Set cnum = c.Offset(0, 1)
c.Interior.ColorIndex = ci.Value
c.Offset(0, 1) = ci.Value
ci.Value = ci.Value + 1
Set c = c2
c.Select
Loop

End Sub

-----Original Message-----
I want to add different colors on toolbar to fill cell

color. Not having to
click on fill color box on toolbar to color cell each

time.
.



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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com