View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Patrick Molloy[_2_] Patrick Molloy[_2_] is offline
external usenet poster
 
Posts: 1,298
Default Linking Formats (color) Between Cells in Diff Wsheets

an alternative way would be to use Format/Styles
create a style with whatever color you want, then apply it to cells on any
of yuor sheets sheets Now if you edit the style and change the color, all
cells formatted with that style will automatically reflect the change

changign color in code then is simplistic...

Option Explicit
Sub test()
ChangeStyleColor 32
ChangeStyleColor 34
End Sub


Sub ChangeStyleColor(colorchoice As Long)
ActiveWorkbook.Styles("Patrick1").Interior.ColorIn dex = colorchoice
End Sub

create a style, in my case I called it Patrick1
select cells and set to this style
F8 (step) through the test code and see the color change




"Russ
---------------------ance,Russ" wrote:

I've seen (my) question answered in bits and pieces (or the silver bullet has
eluded me ;) but this is the precise problem I'm trying to solve:

I want sheet 1 to have a myriad of different colored cells (think
tracking/scheduling)
I want the ability to change the color of any one, or range of cells in
sheet 1 and automatically have corresponding cells in sheet 2 change to same.

I've seen partial answers involving conditional formatting and/or VB...my
dream answer would be without a macro, but if necessary, can anyone point me
to a complete example? (I suck with macros ;)

Thanks much in advance,I've seen (my) question answered in bits and pieces
(or the silver bullet has eluded me ;) but this is the precise problem I'm
trying to solve:

I want sheet 1 to have a myriad of different colored cells (think
tracking/scheduling)
I want the ability to change the color of any one, or range of cells in
sheet 1 and automatically have corresponding cells in sheet 2 change to same.

I've seen partial answers involving conditional formatting and/or VB...my
dream answer would be without a macro, but if necessary, can anyone point me
to a complete example? (I suck with macros ;)

Thanks much in advance