Hi
i have a macro code that creates a folder by what i specify in a cell. i woud like this code to incorporate a message box telling me what folder has been created
Please note i usually create a folder in the following format YYYYMMDD If there is two folders with the same name the following folder creates YYYYMMDD - 2..I would like the message box to say what folder has been created.....
many thanks
i have a macro code that creates a folder by what i specify in a cell. i woud like this code to incorporate a message box telling me what folder has been created
Code:
Sub MakeSubFolder()
Dim lngCount As Long
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
End If
' message box
MsgBox "Folder Created", vbOKOnly, "Cars"
Please note i usually create a folder in the following format YYYYMMDD If there is two folders with the same name the following folder creates YYYYMMDD - 2..I would like the message box to say what folder has been created.....
many thanks