Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create a folder for each name in a list 1

Status
Not open for further replies.

ReillyC

MIS
Feb 6, 2004
114
US
I have a list of employees (287) in excel.
Baker
Cohn
Smith

I need to a create folder for each employee. Can this be automated via a script?

Many Thanks
R
 
Yes. I would suggest looking at the Scripting.FileSystem object.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Set FSO = CreateObject("Scripting.FileSystemObject")
For i = 1 To 1000
FSO.CreateFolder "E:\dump\" & CStr(Cells(i,1).Value)
Next
Set FSO = Nothing

,perhaps you want better logic for the 1 to 1000 with the ActiveCell.CurrentRegion or something like that
 
You may also consider the legacy MkDir VBA instruction.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top