Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I'm looking for a solution to make a copy of a file already open. Function FILECOPY doesn't work because this file is already open... The file I want to copy is a SYS file so it's impossible to open it in Excel and save it as... Would anyone have an idea about it ? If yes, could you please write me a line of code as example. Thanks, Franck V. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim FSO as FileSystemObject
set FSO = new FileSystemObject FSO.CopyFile "C:\test.sys", "D:\My Folder" -- Regards, Tom Ogilvy "Franck V." wrote in message ... Hi, I'm looking for a solution to make a copy of a file already open. Function FILECOPY doesn't work because this file is already open... The file I want to copy is a SYS file so it's impossible to open it in Excel and save it as... Would anyone have an idea about it ? If yes, could you please write me a line of code as example. Thanks, Franck V. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"Franck V." wrote in message ...
Hi, I'm looking for a solution to make a copy of a file already open. Function FILECOPY doesn't work because this file is already open... The file I want to copy is a SYS file so it's impossible to open it in Excel and save it as... Would anyone have an idea about it ? If yes, could you please write me a line of code as example. Thanks, Franck V. Would something like this do it? Private Declare Function CopyFile _ Lib "kernel32" _ Alias "CopyFileA" _ (ByVal lpExistingFileName As String, _ ByVal lpNewFileName As String, _ ByVal bFailIfExists As Long) As Long Sub test() CopyFile "C:\Temp\test.txt", "C:\Temp\test2.txt", 0& End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Open HTML file, but doesn't copy correctly | Excel Worksheet Functions | |||
Save copy of file to open as read only | Excel Discussion (Misc queries) | |||
Open and copy all workbook sheets in a folder to a master file | Excel Discussion (Misc queries) | |||
In Excel - Use Windows Explorer instead of File Open to open file | Excel Discussion (Misc queries) | |||
File does not open/copy | Excel Programming |