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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create New Folders -help... 1

Status
Not open for further replies.

CptCrusty1

Programmer
Feb 17, 2005
216
US
Can anyone point me to some generic instructions on how to create folders?

Much Appreciated..

Thanks
Crusty

I live to work and I work to live.
 
some generic instructions on how to create folders
In a standard code module create the following procedure:
Code:
Sub myMkDir(strFolderName As String)
On Error Resume Next
Dim a, t As String, i As Integer
a = Split(strFolderName, "\")
t = a(0)
For i = 1 To UBound(a)
  t = t & "\" & a(i)
  MkDir t
Next
End Sub

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks rjoubert! Thats exactly what I needed. I even added some spiffy stuff to have the folder name alwasy be the date. I"ll give you a star...

I live to work and I work to live.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top