"marianne" wrote:

> I need to be able to create a list of folders in a directory in an excel spreadsheet.


I'll assume that you mean from an excel spreadsheet; I'll also assume that
your spreadsheet contains a list of folder names.

Try:

Create a module and add this declaration:

Declare Function MakeSureDirectoryPathExists Lib "imagehlp.dll" (ByVal
lpPath As String) As Long

Then

Sub CreateFolder(ByVal Folder as string)
MakeSureDirectoryPathExists Folder
End Sub


This code is tolerant:

1. If the folder exists, it will leave it untouched and not generate an error
2. If your folder is, say, c:\my folder\my user\tasks\, and say c:\my
folder\my user\ exixts already, it will simply create your folder i.e it will
create from scratch or complete the path.
3. Make sure that the folder ends with \

Write another sub to loop through your list (presumably in a column) and
call CreateFolder.