Hello everyone,
I have a special request that I cant solve on my own. I searched all over the internet but could not find anything. I really want to prusue my goal because I am an intern at my company.
I have two documents ("workbooks"). One is called "Doc1", the other one is called "Doc2". Both documents comprise of one table "Table1".
I want to sync the cells A1 between Doc1_Table1 and Doc2_Table1. This needs to work in both ways, e.g. if I make changes in Doc1_Table 1 cell A1, it should sync to Doc2_Table1 cell A1 and vice versa.
I already found a way to sync cells from different tables WITHIN one document. But don't know how to change the code to sync over two documents.
WITHIN the document I can sync two cells over different tables (e.g. table1 & table2) like that:
(this is what i put into table1 to connect to table 2 - and in table two i have the same but replaced for table1)
Private Sub Worksheet_Change (ByVal Target As Range)
If Intersect (Taget, Range ("A1")) Is Nothing Then Exit Sub
Application.EnableEvents = False
Sheets("Table2") .Range("A1") = Target
Application.EnableEvents = True
End Sub
now i need a smiliar code but OVER the two documents.. please help!
One idea was to define the location more precisely:
Private Sub Worksheet_Change (ByVal Target As Range)
If Intersect (Taget, Range ("A1")) Is Nothing Then Exit Sub
Application.EnableEvents = False
Workbooks("Doc1.xlsm").Sheets("Table1") .Range("A1") = Target
Application.EnableEvents = True
End Sub
But this did not work either!
Your help is highly appreciated! Thank you very much!
[/HTML]
Bookmarks