G
Gaurav
Hi,
I am currently creating folders on the basis of below macro, wherein I
pick up the path names from Sheet1, Range A1:A100 and thereafter it
creates the folder.
Sub CreateFolder()
Dim cell As Range
For Each cell In ThisWorkbook.Sheets("Sheet1"). _
Range("A1:100").SpecialCells(xlCellTypeConstants)
MkDir cell.Value
Next cell
End Sub
I would like to edit the macro to include the following (esp. Point a
and b)
a) It should check if the folder exists, if that folder exists, it
will not create that folder.
b) Secondly, I have currently mentioned range of data as A1:A100, I
would like to extend the range automatically based on the data
c) Thirdly, Suppose I want to create folder at path C:\Test\Test2 and
if folder Test does not exist, it should create two folders- Test and
Test2. (It would be ok if points a and b are solved).
Is there any one who could help me out with this.
Thanks,
Gaurav
I am currently creating folders on the basis of below macro, wherein I
pick up the path names from Sheet1, Range A1:A100 and thereafter it
creates the folder.
Sub CreateFolder()
Dim cell As Range
For Each cell In ThisWorkbook.Sheets("Sheet1"). _
Range("A1:100").SpecialCells(xlCellTypeConstants)
MkDir cell.Value
Next cell
End Sub
I would like to edit the macro to include the following (esp. Point a
and b)
a) It should check if the folder exists, if that folder exists, it
will not create that folder.
b) Secondly, I have currently mentioned range of data as A1:A100, I
would like to extend the range automatically based on the data
c) Thirdly, Suppose I want to create folder at path C:\Test\Test2 and
if folder Test does not exist, it should create two folders- Test and
Test2. (It would be ok if points a and b are solved).
Is there any one who could help me out with this.
Thanks,
Gaurav