I am trying to check if a File Exists in a Directory and If it Does Not then I want create it
Seems straightforward enough but I keep getting a "Bad FileName" error on the Open for Output command
Simple code is :
Any Help would be appreciated - Thanks
Seems straightforward enough but I keep getting a "Bad FileName" error on the Open for Output command
Simple code is :
Code:
Dim CheckFile As String
CheckFile = "C:\aaValidate.log"
'--------------------------------------------------------
If Dir(CheckFile) = "" Then
StartTime = Format(Now, "#0.#########0")
Open CheckFile For Output As [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=1]#1[/URL]
Print [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=1]#1[/URL] , StartTime
Any Help would be appreciated - Thanks