Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Can someone help me on this one please. I want to use a macro to do backups,
but the following code work. My sub does have a different name, but surely that doesn't matter. Sub CopyFolder() Dim fso As Scripting.FileSystemObject Set fso = New Scripting.FileSystemObject fso.CopyFolder "c:\old", "c:\new" End Sub Thanks, Brett |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
This works. I changed the directory. You had "new" in the file. I think
the code you used was from a C#, or C++ compiler. Sub CopyFolder() Dim fso Set fso = CreateObject("Scripting.FileSystemObject") fso.CopyFolder "c:\temp\old", "c:\temp\new" End Sub "Brettjg" wrote: Can someone help me on this one please. I want to use a macro to do backups, but the following code work. My sub does have a different name, but surely that doesn't matter. Sub CopyFolder() Dim fso As Scripting.FileSystemObject Set fso = New Scripting.FileSystemObject fso.CopyFolder "c:\old", "c:\new" End Sub Thanks, Brett |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Check your other thread for more responses.
Brettjg wrote: Can someone help me on this one please. I want to use a macro to do backups, but the following code work. My sub does have a different name, but surely that doesn't matter. Sub CopyFolder() Dim fso As Scripting.FileSystemObject Set fso = New Scripting.FileSystemObject fso.CopyFolder "c:\old", "c:\new" End Sub Thanks, Brett -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy a folder by macro | Excel Discussion (Misc queries) | |||
Copy a folder and objects | New Users to Excel | |||
save a backup copy in different folder | Excel Discussion (Misc queries) | |||
Copy a cell to all workbooks within a folder. | Excel Discussion (Misc queries) | |||
Copy files from spreadsheet into folder | Excel Discussion (Misc queries) |