Expand Minimize

MkDir Statement

Last modified: December 06, 2011

Applies to: Office 2013 | VBA

Creates a new directory or folder.

Syntax

MkDir path

The required path argument is a string expression that identifies the directory or folder to be created. The path may include the drive. If no drive is specified, MkDir creates the new directory or folder on the current drive.

This example uses the MkDir statement to create a directory or folder. If the drive is not specified, the new directory or folder is created on the current drive.

MkDir "MYDIR" ' Make new directory or folder. 

Show:
© 2014 Microsoft