View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
2007-User 2007-User is offline
external usenet poster
 
Posts: 35
Default COPY A FILE OUTSIDE OF EXCEL!

Thanks a lot for all of your responses, I'll try those solutions and let you
know bout the results...




wrote in message
ups.com...
Hi 2007-user,
try this one, maybe solve ur problem:

Sub CopyFile()
Dim currentfilename

currentfilename = mid(ActiveWorkbook.Name,1,len(ActiveWorkbook)-4)
' _
'if your ActiveWorkbook is has path, to prevent doubled file extention.
'currentfilename =ActiveWorkbook 'if ur ActiveWorkbook not saved

FileCopy "E:\ENGINEERING FOLDER\001-Ready\Template.ecw", _
"E:\ENGINEERING FOLDER\001-Ready\" & currentfilename & ".ecw"

End Sub

Regards,

Halim



2007-User menuliskan:
Hi,

I have a file called "E:\ENGINEERING FOLDER\001-Ready\Template.ecw" I
would
like to copy this file to the same directory that my current excel file
is
stored and running, after that I would like to rename this new file to "
current excel file name.ecw " , is this possible?
can anyone please help me to create this VBA?

Thanks in advance.