Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Creating a back up copy.


I am trying to create a back up copy of a data file and honestly do no
know how to do it. Both the data file and the new backup file wil
always have the same name and are also going to be in the sam
directory on the hard drive.

Any help would be greatly appreciated.


Also, one more thing (this might be a bit more complex so it does no
need to be addressed). I would have a button used to do this ‘Back Up
function but it would be really cool to have a checkbox (which I have
for ‘Auto-Back Up’ I have another button that will just close save an
close the program but I don’t know how to run a test INSIDE a macr
that check to see if a true or false exists and if true do this.
Otherwise skip this portion of the macro.

Again and always thank you very much for your help,

Ke

--
sungen9
-----------------------------------------------------------------------
sungen99's Profile: http://www.excelforum.com/member.php...nfo&userid=914
View this thread: http://www.excelforum.com/showthread.php?threadid=47537

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Creating a back up copy.

Use the SaveCopyAs method of the workbook.

If <condition = True then

--
Regards,
Tom Ogilvy


"sungen99" wrote in
message ...

I am trying to create a back up copy of a data file and honestly do not
know how to do it. Both the data file and the new backup file will
always have the same name and are also going to be in the same
directory on the hard drive.

Any help would be greatly appreciated.


Also, one more thing (this might be a bit more complex so it does not
need to be addressed). I would have a button used to do this 'Back Up'
function but it would be really cool to have a checkbox (which I have)
for 'Auto-Back Up' I have another button that will just close save and
close the program but I don't know how to run a test INSIDE a macro
that check to see if a true or false exists and if true do this.
Otherwise skip this portion of the macro.

Again and always thank you very much for your help,

Ken


--
sungen99
------------------------------------------------------------------------
sungen99's Profile:

http://www.excelforum.com/member.php...fo&userid=9144
View this thread: http://www.excelforum.com/showthread...hreadid=475370



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Creating a back up copy.


Desperate bump please. Really need to get some help with this one

--
sungen9
-----------------------------------------------------------------------
sungen99's Profile: http://www.excelforum.com/member.php...nfo&userid=914
View this thread: http://www.excelforum.com/showthread.php?threadid=47537

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Creating a back up copy.


Ok I get the conditional now but I’m still having problems with the
backup thing. I see all the examples are backing up the active
workbook. This is not the case with my situation. The file I need to
back up is located he
C:\Documents and Settings\Dan Sharron\Mrs\Admin\Execution\Mrs 2005
Data-Ver1 1.xls
I would like to just make a copy of this file and call it:
C:\Documents and Settings\Dan Sharron\Mrs\Admin\Execution\Mrs 2005
Data-Ver1 1 Backup.xls


--
sungen99
------------------------------------------------------------------------
sungen99's Profile: http://www.excelforum.com/member.php...fo&userid=9144
View this thread: http://www.excelforum.com/showthread...hreadid=475370

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Creating a back up copy.


Desperate bump please. Really need to get some help with this one.


--
sungen99
------------------------------------------------------------------------
sungen99's Profile: http://www.excelforum.com/member.php...fo&userid=9144
View this thread: http://www.excelforum.com/showthread...hreadid=475370



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Creating a back up copy.



s1 = "C:\Documents and Settings\Dan Sharron" & _
"\Mrs\Admin\Execution\Mrs 2005 Data-Ver1 1.xls"
s2 = "C:\Documents and Settings\Dan Sharron" & _
"\Mrs\Admin\Execution\Mrs 2005 Data-Ver1 1 Backup.xls

On error resume next
Kill s2
filecopy s1, s2

Remarks

If you try to use the FileCopy statement on a currently open file, an error
occurs.

--

Regards,

Tom Ogilvy




"sungen99" wrote in
message ...

Ok I get the conditional now but I'm still having problems with the
backup thing. I see all the examples are backing up the active
workbook. This is not the case with my situation. The file I need to
back up is located he
C:\Documents and Settings\Dan Sharron\Mrs\Admin\Execution\Mrs 2005
Data-Ver1 1.xls
I would like to just make a copy of this file and call it:
C:\Documents and Settings\Dan Sharron\Mrs\Admin\Execution\Mrs 2005
Data-Ver1 1 Backup.xls


--
sungen99
------------------------------------------------------------------------
sungen99's Profile:

http://www.excelforum.com/member.php...fo&userid=9144
View this thread: http://www.excelforum.com/showthread...hreadid=475370



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Creating a back up copy.


Ahhhhhh. That worked!

Thanks very much for your help.


--
sungen99
------------------------------------------------------------------------
sungen99's Profile: http://www.excelforum.com/member.php...fo&userid=9144
View this thread: http://www.excelforum.com/showthread...hreadid=475370

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy back macro/roll back moh Excel Worksheet Functions 4 March 5th 07 02:19 PM
Creating tables based on looking down a column and back across a row thecrow Excel Worksheet Functions 0 January 23rd 07 05:20 PM
creating a new sheet (back log) steve Excel Programming 0 July 19th 05 04:46 PM
Creating a back key Kevin Smith[_4_] Excel Programming 1 April 7th 05 12:24 PM
Creating a monthly back up using Auto_close?? Simon Lloyd[_521_] Excel Programming 9 July 9th 04 09:23 PM


All times are GMT +1. The time now is 08:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"