backing up file in directory
it seems that you'll need to remove the final 3 letters ie change the rel
extention to org
newname = left(OFILE,len(OFILE)-3) & "org)
FileCopy OFILE , newfile
--
Patrick Molloy
Microsoft Excel MVP
----------------------------------
wrote in message
...
The user is asked to select a file:
Dim SaveDriveDir As String
SaveDriveDir = CurDir
ChDrive "C"
ChDir "C:\NREP\REL"
OFILE = Application.GetOpenFilename("NREP Relative Power Files,*.rel",
1, "Select One File To Open", , False)
Now I want to copy the file with a new name because I am going to
overwrite the existing file OFILE
copy OFILE & ".org"
How do I do this?
Lance
|