-->
I think you missed my point, I am recommending forget the progress bar entirely and use the StatusBar (a native feature to VBA) to inform the user of the copying status. On a separate point, if you copied the file to a local destination to where the macro is running from, it will open the file much faster, than trying to open it from a. The quick and easy way is to use Application.StatusBar. Code: Application.StatusBar = 'Processing File: ' & sFile. Beyond that, the next level is coding userform-based progress bars. Google 'excel vba progress bar'. There are a lot of examples. Apr 29, 2007 Also if you did want to use Windows standard copy dialog with the progress bar, you don't need to use API calls as shown above. It is built right into the framework. By specifying the FileIO.UIOption.AllDialogs, it will display the copy dialog for large file copies.
Copies a file.
Syntax
FileCopysource, 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 file that is currently open, an error occurs.
Example
This example uses the FileCopy statement to copy one file to another. For the purposes of this example, assume that the file contains some data.
See also
Support and feedback
Vba File Copy Progress Bar Python
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
The FileSystemObject VBA CopyFolder method copies one or more folders from one a source to a destination location.
VBA CopyFolder Syntax
Vba File Copy Progress Bar Example
source
The source location of the folders. You can use wildcards such as *.* to specify more than a single folder matching the pattern.
destination
The destination location (folder) where the source folders are to be copied to.
overwrite
Optional. If True will overwrite folders with same name in destination folder. If True it will omit folders for which there is an existing folder in the destination folder.