The Naked Scientists

The Naked Scientists Forum

Author Topic: Is it possible to save a file to more than one location all at the same time?  (Read 4891 times)

Offline neilep

  • Withdrawnmist
  • Naked Science Forum GOD!
  • *******
  • Posts: 20602
  • Thanked: 8 times
    • View Profile
I keep a daily log of my workout regime and save the data as an excel spreadsheet...how sad am I eh ?..but it does help me gauge my progress !...How can I save this file to my hard disk and usb drives and external hard disk with one action ?

Can I ?..is it possible ?




 

Offline RD

  • Neilep Level Member
  • ******
  • Posts: 8134
  • Thanked: 53 times
    • View Profile
It may be possible to write a short programme, a "macro", to save copies of your spreadsheet in different locations...

Quote
An Excel macro is a set of instructions that can be triggered by a keyboard shortcut, toolbar button or an icon in a spreadsheet. Macros are used to eliminate the need to repeat the steps of common tasks over and over.
http://spreadsheets.about.com/od/m/g/macro_def.htm


Quote
COPYING MOVING RENAMING AND DELETING

Copying Moving And Renaming A File Without Opening It
Using FileCopy To Copy Files Or Workbooks
How To Delete A File
Getting Document And File Properties
Deleting Files And Directories So That You Can Undelete Them
SAVING FILES OR WORKBOOKS
Eliminating The File Exists... Message When Using The SaveAs Method
Saving A File In A New Directory With A New Name
How To Save A Workbook In Excel 5 Format
Make File Saving Mandatory
Saving A Backup Copy Of A File
http://www.add-ins.com/vbexamplestopics.htm

Caution: an Excel macro could change the data in the spreadsheet.
 

Offline DoctorBeaver

  • Naked Science Forum GOD!
  • *******
  • Posts: 12656
  • Thanked: 3 times
  • A stitch in time would have confused Einstein.
    • View Profile
I use Memeo synchronisation software. Select the folder(s) you want synchronised and whenever there is a change in any of them Memeo automatically writes the change to another location.

For instance, I've got my development folder synched and all changes are written to an external hard drive.

Memeo runs in background so it doesn't impede system performance (I've set mine to load on boot and run on idle).

It is an absolute doddle to set up, just a few clicks of the mouse. You don't need any technical knowledge at all.

HERE is a review. Or go to the Memeo website
« Last Edit: 09/03/2009 11:48:30 by DoctorBeaver »
 

Offline yor_on

  • Naked Science Forum GOD!
  • *******
  • Posts: 12001
  • Thanked: 4 times
  • (Ah, yes:) *a table is always good to hide under*
    • View Profile
As you use and know excel Neil, you could look at excel macros to do the work for you.
If you work in it, and like it, you should take a look.

-----quote------

There are times you may want a macro to save a file automatically after running a macro. The second macro will save the file with a name called "MyFile". You may specify the path if you need to.

    Sub Save()
    ActiveWorkbook.Save
    End Sub
    Sub SaveName()
    ActiveWorkbook.SaveAs Filename:="C:\MyFile.xls"
    End Sub

(The 'path' here is where you state where you want you files to go Neil, like, if your usb is on E:\ Then the path would be f ex.  "E:\my_saves\MyFile.xls"   :)

--


Here is one I made.

----Copy and Paste the stuff under this--------


Sub Save()
ActiveWorkbook.Save
End Sub
Sub SaveName()
ActiveWorkbook.SaveAs Filename:="E:\my_saves\NeilsFile.xls"
ActiveWorkbook.SaveAs Filename:="F:\my_saves\NeilsFile.xls"
ActiveWorkbook.SaveAs Filename:="G:\my_saves\NeilsFile.xls"
End Sub

---------( All in one, so to speak :)------


(Sorry, been some time since I programmed.
I used E:\ and F:\ and G:\ as the 'locations / paths' you wanted to save to :)

And check up what 'path' your USB  have first:) aka E:\ or where ever that path might be..
-----From http://www.angelfire.com/biz7/julian_s/julian/julians_macros.htm




As for the script syntax (VBA) I chanced here, but take a look around on the 'beginners guide' down under and see how you write the code in Excel. You could do it with sub functions in a loop, sort of, but I don't write VBA code myself. But I got the impression that my script would work as it is. It won't destroy anything to test.


Look here for a beginners guide.
http://www.anthony-vba.kefra.com/index_011.htm



Good luck.
« Last Edit: 11/03/2009 11:27:34 by yor_on »
 

The Naked Scientists Forum


 

SMF 2.0.10 | SMF © 2015, Simple Machines
SMFAds for Free Forums
 
Login
Login with username, password and session length