Update multiple sheets simultaneously

[Closed]
Report
Posts
1
Registration date
Wednesday June 30, 2010
Status
Member
Last seen
June 30, 2010
-
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
-
Hello,

How to update two identical workbooks in different locations in same pc simultaneously.
I have two identical excel workbooks. When I update/change original workbook, duplicate workbook should be updated automaticaly.

1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
Well one option could be that on save, you save it twice. once as this file and one as other file. This piece of code needs to go to ThisWorkbook module in VBE

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)  
    Application.EnableEvents = False  
        cancel = true  
        ThisWorkbook.SaveAs "c:\location1\book1.xls"  
        ThisWorkbook.SaveAs "c:\location2\book1.xls"  
          
      
    Application.EnableEvents = True  
End Sub
1
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2942 users have said thank you to us this month