View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Barry-Jon Barry-Jon is offline
external usenet poster
 
Posts: 17
Default Creating a new folder

It sounds like you are referring to the Scripting runtimes
FileSystemObject. It is worth using as it wraps a lot of oft-needed
functionality in a very easy to use manner. To use it you need to
reference the library from the VBA editor by going to Tools -
References... From there you should find "Microsoft Scipting Runtime",
check the box and you're ready to go. An example of doing what you
wanted is below. I would highly recommend searching for
filesystemobject in the vba help - it's a great resource. Is this what
you were thinking of?

Sub CreateDirectory(Path As String)

Dim fso As Scripting.FileSystemObject

Set fso = New Scripting.FileSystemObject

fso.CreateFolder (Path)

End Sub