jaf97a
03-03-2008, 09:05 AM
Hello,
I am trying to do a sheetchange across multiple workbooks -(example- when I type data with in this range A1:G10 of Sheet1 in Book1 I want that same data to show up in that same cell of Sheet1 in Book2.
AND vice versa (Book2 to Book1 with the same sheet and range)
I can get it to work between sheets in the same workbook but can't seem to get it to work for the same sheets between workbooks. Here is the code I use to get it to work between sheets in the Same workbook:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If UCase(Sh.Name) = "SHEET1" Or UCase(Sh.Name) = "SHEET2" Then
If Not Application.Intersect(Target, Range("A1")) Is Nothing Then
Application.EnableEvents = False
If UCase(Target.Parent.Name) = "SHEET1" Then
Sheets("Sheet2").Range("A1") = Target
Else
Sheets("Sheet1").Range("A1") = Target
End If
Application.EnableEvents = True
End If
End If
End Sub
Thanks in advance for any help on this matter!
I am trying to do a sheetchange across multiple workbooks -(example- when I type data with in this range A1:G10 of Sheet1 in Book1 I want that same data to show up in that same cell of Sheet1 in Book2.
AND vice versa (Book2 to Book1 with the same sheet and range)
I can get it to work between sheets in the same workbook but can't seem to get it to work for the same sheets between workbooks. Here is the code I use to get it to work between sheets in the Same workbook:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If UCase(Sh.Name) = "SHEET1" Or UCase(Sh.Name) = "SHEET2" Then
If Not Application.Intersect(Target, Range("A1")) Is Nothing Then
Application.EnableEvents = False
If UCase(Target.Parent.Name) = "SHEET1" Then
Sheets("Sheet2").Range("A1") = Target
Else
Sheets("Sheet1").Range("A1") = Target
End If
Application.EnableEvents = True
End If
End If
End Sub
Thanks in advance for any help on this matter!