Creating folders.


Posted by Simon on November 17, 2001 3:01 AM

I am trying to work out how to create a new folder with a pathname derived from a text string contained in a cell.
I get the path (eg c:\data\ordering system\orders\t\test) using concatenate, then copy /paste_special/ value, and then want to create the folder using mkdir.
HELP PLEASE. I am going crazy!!!

Posted by Dank on November 17, 2001 3:19 AM

Say your folder path is in cell D5 you could use this code to create the folder:-

Sub MakeDirectory()
Dim strFolder As String

strFolder = Range("D5").Value
MkDir strFolder

End Sub

Hope it helps,
Daniel.



Posted by Simon on November 17, 2001 3:44 AM

Dank.....i tried that and it gave me a run time error 76 path not found.....