Linking formats

E

eroszzz

Does anyone know if there is a way to link the format of a cell in on
workbook, to a cell in another workbook? For ex. - if I change th
color of cell A1 in workbook1 to green - I would like it t
automatically change cell A1 in workbook2 to green as well. An
ideas
 
F

Frank Kabel

Hi
not possible with formulas. even using an event procedure won't help as
for example the worksheet_change event is not triggered by a format
change
 
J

JE McGimpsey

Well, an event procedure won't change the format in real time, but
Workbook_Activate and _Deactivate could keep them synchronized when
going back and forth between workbooks. Here's a simple code that works
if the workbooks are both open. Would need to add some code to
open/close the other workbook if that's desired:


Dim wbBook2 As Workbook

Private Sub Workbook_Activate()
If wbBook2 Is Nothing Then Set wbBook2 = Workbooks("Book2.xls")
wbBook2.Sheets("Sheet1").Range("A1").Copy
ThisWorkbook.Sheets("Sheet1").Range("A1").PasteSpecial _
Paste:=xlFormats
End Sub


Private Sub Workbook_Deactivate()
If wbBook2 Is Nothing Then Set wbBook2 = Workbooks("Book2.xls")
ThisWorkbook.Sheets("Sheet1").Range("A1").Copy
wbBook2.Sheets("Sheet1").Range("A1").PasteSpecial _
Paste:=xlFormats
End Sub
 
Top