Excel MkDir VBA Function: A Guide | Excel Help
Your Programming and Traning Professionals

Excel MkDir VBA Function: A Guide


The Excel MkDir function can be combined with the Len function to find out of a directory exisits and

if not, then create that directory.


MkDir is very easy to use, the user would execute by simply using MkDir “C:testtest” to create the structure.

The example below is used with the Len Function to find if a directory exists:


If Len(Dir("C:TestTest",vbDirectory)) = 0 Then 'If dir does not exist
MkDir("C:TestTest")
'Function creates the directory
End If

If you need excel help and custom application design, please Contact Us and receive a free quote.