An object-oriented programming language developed by Microsoft that can be used in .NET.
Hi @Coates, Donald ,
Thanks, you for your question
CopyFolder is a single method name and not a combination of the keywords Copy and Folder. In VBA, it is a method of the FileSystemObject object that is used to copy a folder and its contents (including subfolders).
For example:
Dim fso As Object
Set fso = CreateObject("Scripting.FileSystemObject")
fso.CopyFolder "C:\SourceFolder", "C:\DestinationFolder"
The syntax is: object.CopyFolder source, destination, [ overwrite ]
where:
- object is a FileSystemObject
- source is the folder to copy
- destination is the target location
- overwrite is an optional parameter that defaults to True
If you're trying to understand VBA command structure in general, methods such as CopyFolder, CopyFile, MoveFolder, and MoveFile are predefined method names provided by the FileSystemObject library rather than combinations of separate VBA commands.
For additional details, you can refer to the Microsoft documentation for the CopyFolder method and FileSystemObject object.
If you found my response helpful or informative, I would greatly appreciate it if you could follow this guide for your confirmation. Thank you.