PDA

View Full Version : Solved: Create new folder with name and date



Gil
02-07-2011, 08:46 AM
Hello
I am using this code to create a new folder that will always be called Historic.I want to add the current date and time if possible to the file name. Any suggestions would be greatly appreciated.

Gil


Option Explicit

Sub Historic1()

MkDir "C:\Users\Desktop\Log\Historic"

End Sub

Gil
02-07-2011, 08:53 AM
Hello

Sorry about this but have just resolved it myself


Option Explicit

Sub Historic1()

MkDir "C:\Users\Gil's\Desktop\Log\Historic" & " " & Format$(Date, "dd-mm-yyyy") & " " & Format$(Time, "hh-mm-ss")

End Sub


Gil

:doh: