DriveExists method

Returns True if the specified drive exists; False if it does not.

Syntax

object.DriveExists (drivespec)

The DriveExists method syntax has these parts:

Part Description
object Required. Always the name of a FileSystemObject.
drivespec Required. A drive letter or a path specification for the root of the drive.

Remarks

For drives with removable media, the DriveExists method returns True even if there are no media present. Use the IsReady property of the Drive object to determine if a drive is ready.

See also

Support and feedback

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.