View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
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