Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Excel (duplicate workbook)

Posted on 2011-10-20
10
Medium Priority
?
345 Views
Last Modified: 2012-06-27
Hi, Is there a way that I can make a copy of a workbook, put it in a different folder, and have it update automatically every time I make changes to the original workbook?
Thanks
0
Comment
Question by:camtz
10 Comments
 
LVL 8

Accepted Solution

by:
Amit Khilnaney earned 1000 total points
ID: 37003567
Yes it is possible but depends on the operating system

With Windows Vista / 7

You can go with this by creating a Hard Link (A duplicate copy but not a shortcut)

http://msdn.microsoft.com/en-us/library/windows/desktop/aa365006%28v=vs.85%29.aspx
http://www.howtogeek.com/howto/windows-vista/using-symlinks-in-windows-vista/

This just not apply to excel but any kind of file. be it word, ppt or anything...
0
 
LVL 39

Assisted Solution

by:nutsch
nutsch earned 1000 total points
ID: 37003606
You can also put this in your source workbook's workbook module:

Private Sub Workbook_AfterSave(ByVal Success As Boolean)
Dim sDestWbk As String

sDestWbk = "C:\temp\myfile.xls"

Application.DisplayAlerts = False
ActiveWorkbook.SaveCopyAs sDestWbk
Application.DisplayAlerts = True

End Sub

Open in new window


Thomas
0
 
LVL 26

Expert Comment

by:redmondb
ID: 37003688
AmitKhilnaney,

It may be exactly what camtz wants, but aren't hard links (in Windows, at least) a matter of pointers rather than physical copies of the data? If so, they wouldn't be much use for backup.

Regards,
Brian.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 8

Expert Comment

by:Amit Khilnaney
ID: 37003738
redmondb:

Windows has hardlinks, softlinks and symbolic links.. There is difference between them..

So in Windows what is the difference between a short-cut and symbolic link (sym-link) and a hard link?

A short cut is basically a file that points to another file. It is an antiquated, pointing system from the Windows 95 era. Shortcuts not only use up space on your hard drive, they linger around after the item they are pointing to has been deleted and may break if the destination is renamed or moved.

A symbolic link is like a short cut but instead of being saved as a file, they are registered to the file system. This means they do not use hard disk space but programs recognise and can read where the link is pointing to. A symbolic link can point to any file or folder either locally on the computer and over a network using a SMB path.

A file hard link and the directory junction are a little different. It not only points to the item but duplicates it as a copy without taking up the extra hard disk space required by a clone. If you have a hard link pointing to a file then delete the original file, the hard link will still retain a copy of the clone. One limitation of the file hard link is that the link can only be made on the same file partition as the file.

Finally a junction is a hard link for directories. To me they are the most useful and unlike their file hard links counterparts you can create junctions on different partitions. Again a junction is stored on the file system where it does not take up additional space and is treated by the operating system and programs as a local folder.

For more explanation

http://ipggi.wordpress.com/2009/09/07/windows-file-junctions-symbolic-links-and-hard-links/
0
 
LVL 26

Expert Comment

by:redmondb
ID: 37003817
AmitKhilnaney,

Yes, that was my understanding also (roughly!).

However, "duplicates it as a copy without taking up the extra hard disk space required by a clone" - so there's only ever a single version of the data. If that becomes corrupt then both the original and the hard-link are knackered. (The only protection that hard-link gives you is that if you delete the original then the data is still accessible via the hard-link.)

Regards,
Brian.
0
 
LVL 8

Expert Comment

by:Amit Khilnaney
ID: 37003866
redmondb:

Yes you are correct on that part.. But excel auto recovery works fine in general situation. Or if user have enabled Voume shadow copy services that can help also..  but in general senario i mean non server/enterprise scenarios hard link is quite effective solution.
0
 
LVL 26

Expert Comment

by:redmondb
ID: 37003879
Thanks, AmitKhilnaney. Mainly, I was just checking my understanding. As I mentioned at the start, hard links may be exactly what he wants. Oh...

camtz - what do you want the copy for?  :)

Regards,
Brian.

0
 
LVL 8

Expert Comment

by:Amit Khilnaney
ID: 37003924
you welcome redmondb

Thanks

Amit
0
 

Author Closing Comment

by:camtz
ID: 37004568
Many thanks
0
 
LVL 8

Expert Comment

by:Amit Khilnaney
ID: 37005626
you welcome camtz

Thanks

Amit
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question