View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Mike Fogleman[_2_] Mike Fogleman[_2_] is offline
external usenet poster
 
Posts: 206
Default sheets that mirror each other

It worked OK on my test sheets. This assigns a value to a cell and does not
trigger the Change event in the other sheet. Editing the cell does, but only
for that sheet.

Mike F
"Robert Crandal" wrote in message
...
Wouldn't this cause an infinite loop or something???
Sheet2 will try to mirror the contents of Sheet 1, but
Sheet 1 will also notice the cell change and try to mirror Sheet2
and vice versa, on and on and on???

What do you think?

"Mike Fogleman" wrote in message
...

In sheet1 code module put this:
Private Sub Worksheet_Change(ByVal Target As Range)
Sheet2.Range(Target.Address).Value = Target.Value
End Sub

in Sheet2 code module this:
Private Sub Worksheet_Change(ByVal Target As Range)
Sheet1.Range(Target.Address).Value = Target.Value
End Sub