Hi All,
I have the following code..
Is there a way to loop it so it creates the folder in column c and goes up to create next one, so after I select ok on msgbx ......
I have the following code..
Code:
Dim lngCount As Long, Msg As String
lngCount = 2
If Len(Dir(Cells(1, 20), vbDirectory)) = 0 Then
MkDir Cells(1, 20)
Else
Do Until Len(Dir(Cells(1, 20) & " - " & lngCount, vbDirectory)) = 0
lngCount = lngCount + 1
Loop
MkDir Cells(1, 20) & " - " & lngCount
Msg = " - " & lngCount
End If
' message box
MsgBox "Folder Created for:" & vbCr & vbCr & Format(Cells(2, 12), "YYYYMMDD") & Msg, vbOKOnly, "View History Report"
Is there a way to loop it so it creates the folder in column c and goes up to create next one, so after I select ok on msgbx ......