Hi
Not sure about an add in, but the following code will reset th
workbook's scheme colors according to the contents of a worksheet.
Assuming your Red Green Blue values are
* in adjacent cells in columns B, C & D
* starting at row 2, ending at row 57 (ie in range B2

:57)
* on a sheet named"sheet1"
this code should work:
Sub reset_colors()
res = InputBox("enter number of scheme colors to reset - note, maximu
is 56", "series to reset", 56)
If res <> "" And res <> CInt(res) Then
res = CInt(res)
If res > 56 Then res = 56
MsgBox "only whole numbers of series between 1 and 56 can be changed.
& res & " series will be changed"
End If
If res <> "" And res > 56 Then
MsgBox "the maximum number is 56. 56 colors will be changed"
res = 56
End If
If res <> "" And res < 1 Then
MsgBox "the minimum number is 1. no colors will be changed"
res = ""
End If
For n = 1 To res
red_c = Sheets("sheet1").Rows(n + 1).Columns(2).Value
green_c = Sheets("sheet1").Rows(n + 1).Columns(3).Value
blue_c = Sheets("sheet1").Rows(n + 1).Columns(4).Value
ActiveWorkbook.Colors(n) = RGB(red_c, green_c, blue_c)
Next
End Sub
I have also attached a spreadsheet with the layout and code include
Attachment filename: set colors.xls
Download attachment:
http://www.excelforum.com/attachment.php?postid=52701
--
Message posted from
http://www.ExcelForum.com