![]() |
File Copy
look in help for copyfile.
If is part of the filesystemobject in the scripting runtime. If the files are closed, you can use the built in VBA command filecopy. from help Copies a file. Syntax FileCopy source, destination The FileCopy statement syntax has these named arguments: Part Description source Required. String expression that specifies the name of the file to be copied. The source may include directory or folder, and drive. destination Required. String expression that specifies the target file name. The destination may include directory or folder, and drive. Remarks If you try to use the FileCopy statement on a currently open file, an error occurs. ------------- The example: This example uses the FileCopy statement to copy one file to another. For purposes of this example, assume that SRCFILE is a file containing some data. Dim SourceFile, DestinationFile SourceFile = "SRCFILE" ' Define source file name. DestinationFile = "DESTFILE" ' Define target file name. FileCopy SourceFile, DestinationFile ' Copy source to target. -- Regards, Tom Ogilvy Neil wrote in message ... My last post for today, thank you to everyone that has replied to the few questions I have posted... I am using the MSOfilepicker object to put up a box from which the user can select some files, I then have an item call vrtselecteditems, at least i thinks thats what it was called, I would like to copy all the sleected files from vrtselected items to a target dir called foldername, I have looked in the help, but I cant seem to pin it down, are there different dgrees of help files ? The help I have installed seems pretty limited, either that or im using it incorrectly :( |
All times are GMT +1. The time now is 12:23 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com