is it possible to make a mirror copy of excel files.

  • Hi,
    I am working in my office in a windows 98 pc with excel 2000. I am working on Excel files on my hord disk,

    My boss want in his hord disk all the files to be appeared. So he can view and Modify his hord disk files.

    He does not want any copy paste in the end of the day.

    The reason is He want the files with out knowing the user who entering the data.

    Example if he make file new and type something and save in his hord disk, that shold also save in boss's computer.

    He does not matter that saveing happen after some time. but it has to happen auto.

    I hope many will make use of this too.

    [email protected]
    Mumbai. India.

  • Hi,

    *Personally* I would use a standalone backup-software instead of XL and scheduled the copying.

    1. I think it can´t be done directly to his harddisk only to his account on the server.

    2. If You want to do it in XL You need to consider to create a add-in, that is distributed to all co-workers.

    You need to decide wether You want to use the old DOS-commands in XL, like copy dir etc (see the directhelp) or using the File System Object (FSO).

    The later require a reference to the Microsoft Scripting Runtime library via the Tools | Reference... in the VB-editor or through the CreateObject.

    You can read more about the FSO here:]Microsoft Scripting[/url]

    Anyway, at this stage I don´t I can contribute with more.

    Kind regards,

  • I hopr this helps if you wish you can edit the codes its all commented, i wrote this for someone at work some time back and as such is unedited, things have moved on from here, but this is the original as was, and is still used to this day.

    Jack in the UK
    [vba]Sub Jacks_BACKUP_By_DirDateTime_commented()
    'Designed and created by Jack in the UK 6th June 2002 in London.

    'Jack Names the Sub Routine.
    Dim JackintheUKs_Test_Dir_Exists As String
    'Jacks Sets the Directory to Test if Exists.
    Dim JackintheUKs_Directory_Location_MainTree As String
    'JACK Sets Main Dir to Check and Set if NON Exists.
    Dim JackintheUKs_Directory_Location_SubDir As String
    'JACK Sets SUB Dir to Check and Set if NON Exists.
    JackintheUK_Date_Format = Format$(Now, "dddd d mmmm yyyy")
    'JACK Sets His DATE Fomat UK STYLE *dddd mmmm d yyyy* Would be US Version.
    JackintheUKs_Time_Format = Format$(Now, "hh mm ss")
    'Jack Sets His Time Format to Hours Minutes Seconds.

    JackintheUKs_Directory_Location_MainTree = "C:\JACKS Backups Archive"
    'JACK Sets Location of Archive Directory to MainTree
    JackintheUKs_Test_Dir_Exists = Dir(JackintheUKs_Directory_Location_MainTree, vbDirectory)
    'Jack Tests to See if MainTree Directory Exists. As C:\JACKS Backups Archive.
    If (JackintheUKs_Test_Dir_Exists = "") Then MkDir (JackintheUKs_Directory_Location_MainTree)
    'Jacks Sets IF Statment
    'Jack Tests If MainTree Exists Then DO NOTHING, BUT Add File Into That Directory.
    'Jack Tests If MainTree Does Not Exist Then CREATE IT.
    ChDir "C:\JACKS Backups Archive"

    'Jack Changes Directory From Default C: to C:\JACKS Backups Archive

    JackintheUKs_Directory_Location_SubDir = "C:\JACKS Backups Archive\JACK " & JackintheUK_Date_Format
    'Jack Sets Location of Archive Directory to Sub Directory.
    JackintheUKs_Test_Dir_Exists = Dir(JackintheUKs_Directory_Location_SubDir, vbDirectory)
    'Jack Tests to See if Sub Directory Exists. As C:\JACKS Backups Archive\JACK and date
    If (JackintheUKs_Test_Dir_Exists = "") Then MkDir (JackintheUKs_Directory_Location_SubDir)
    'Jacks Sets IF Statment
    'Jack Tests If Sub Directory Exists Then DO NOTHING, BUT Add File Into That Directory.
    'Jack Tests If Sub Directory Does Not Exist Then CREATE IT.

    ActiveWorkbook.SaveCopyAs _
    Trim(JackintheUKs_Directory_Location_SubDir & _
    "\JACKS Backup_" & _
    JackintheUK_Date_Format & _
    " TIME ~ " & _
    JackintheUKs_Time_Format & _
    " ~ Filename ~ " _
    & ActiveWorkbook.Name)

    'Jack* ActiveWorkbook.SaveCopyAs _
    'Jack Sets the Save Copy of Original Document to SaveAs (With Jacks Special Touch)

    'JACKs NOTE **** the _ is an Extension command so can bolt on, Aides Ease or Read.

    'Jack* Trim
    'Jack Uses the VB Command of Trim to Fragment the Save Statement

    'JACK* (JackintheUKs_Directory_Location_SubDir & _
    'Jacks Sets the Save to SubDir IE C:\JACKS Backups Archive\JACK
    'JACKS Note **** This is As There is no Needs to Set Main.

    'JACKS Note **** the & is Required to bolt on another / extram part.

    'JACK* "\JACKS Backup_" & _
    'Jack Sets TEXT to Read JACKS Backup

    'JACK* JackintheUK_Date_Format & _
    'Jacks Sets Date to be Added to File Name as Required Format.

    'JACK* " TIME ~ " & _
    'Jack Sets TEXT to Read TIME ~

    'JACK* JackintheUKs_Time_Format & _
    'Jacks Sets TIME to be Added to File Name as Required Format.

    'JACK* " ~ Filename ~ " _
    'Jack Sets TEXT to ~ Filename ~

    'JACK* & ActiveWorkbook.Name)
    'JAck Adds The Original File Name from Original WorkBook.

    'JACK* ActiveWorkbook.Save
    'Jacks Just Saves teh Original WorkBook

    End Sub[/vba]

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!