Skip to main content

FileSystemObject.GetFile method

Table of contents
  1. Syntax
  2. Remarks

Returns a File object corresponding to the file in a specified path.


object.GetFile (filespec)

The GetFile method syntax has these parts:

Part Description
object Required. Always the name of a FileSystemObject.
filespec Required. The filespec is the path (absolute or relative) to a specific file.


An error occurs if the specified file does not exist.

Leave a comment

Your email address will not be published. Required fields are marked *

Format your code: <pre><code class="language-vba">place your code here</code></pre>