Creating two linked copies of one workbook

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello. I would like to create two spreadsheets that are exactly the same in
two different places. Essentially, I would like to use a spreadsheet on my
local drive that updates a spreadsheet on a network drive that is accessible
to other people. This way when I save to my local spreadsheet it
automatically updates to the network document. Can this be done and how?
Thanks.
 
Hi Jim

Try this

You can use SaveCopyAs
Copy this in the Thisworkbook module to save the file also in C:\ (change that)

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
ThisWorkbook.SaveCopyAs "C:\" & ThisWorkbook.Name
End Sub
 
Ron,

Thanks for the prompt response! I have never used the savecopyas feature.
If you could give me a bit more detail on exactly how to use this that would
be great.

Thanks
 
Hi Jim

Right click on the Excel icon next to File in the Worksheet menu bar
Choose view code
Paste this event in the Thisworkbook module that is now active
Alt-q to go back to Excel

Change the path (C:\) to your network path
like this \\????\????\

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
ThisWorkbook.SaveCopyAs "C:\" & ThisWorkbook.Name
End Sub

Now everytime you save your local workbook it will save a copy on the network
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top