Referencing an old 2009 thread - Syncing two cells in different worksheets by skyrave in 2009.
I must be missing a little piece of code or have a something listed wrong.
Please help.
=================
This Works ..... The data updates in A1 as I am typing it in A2.
==================
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim rCell1 As Range
Dim rCell2 As Range
If Target.Count > 1 Then Exit Sub
On Error GoTo err_handler
Set rCell1 = Sheets("A").Range("A1")
Set rCell2 = Sheets("B").Range("A2")
Application.EnableEvents = False
Select Case ActiveSheet.Name
Case "A": If Target.Address = rCell1.Address Then rCell2.Value = rCell1.Value
Case "B": If Target.Address = rCell2.Address Then rCell1.Value = rCell2.Value
End Select
err_handler:
Application.EnableEvents = True
End Sub
========================
This does NOT work .....
The only difference between these two code snippets are:
- the two 'Sheets' references. Above its "A" and "B" and Below, its "Cockpit" and "Enroute Flt Mgt" and
- Cell references above are "A1" & "A2" and below its "B11" and "E9"
========================
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim rCell1 As Range
Dim rCell2 As Range
If Target.Count > 1 Then Exit Sub
On Error GoTo err_handler
Set rCell1 = Sheets("Cockpit").Range("B11")
Set rCell2 = Sheets("Enroute Flt Mgt").Range("E9")
Application.EnableEvents = False
Select Case ActiveSheet.Name
Case "A": If Target.Address = rCell1.Address Then rCell2.Value = rCell1.Value
Case "B": If Target.Address = rCell2.Address Then rCell1.Value = rCell2.Value
End Select
err_handler:
Application.EnableEvents = True
End Sub
===================
It's gotta be something simple I am just not seeing. please help
Bookmarks