How to make a new Directory?

AFGPHXExcel
AFGPHXExcel used Ask the Experts™
on
I am trying to create a new folder and I am getting a run-time errror 76: Path not found.

RCOTSaveLoc = "c:\LogcapRequests\" & [c_NameGen_PPR].Value & "\"
        If Len(Dir(RCOTSaveLoc, vbDirectory)) = 0 Then
        MkDir RCOTSaveLoc
        End If

Also, RCOTSaveLOC= "c:\LogcapRequests\FLR-11-0005-CJ05-228-143217-R0\". I've tried with and without the "\" at the end. Any help would be much appreciated.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
AFGPHXExcel,

Does FLR-11-0005-CJ05-228-143217-R0 directory already existed under c:LogcapRequests\?

Ed

Author

Commented:
No it does not.
If it is not yet existed, you need to create a folder under c:\LogcapRequests and name it as FLR-11-0005-CJ05-228-143217-R0 before you can use it in your code.

Sincerely,
Ed

Author

Commented:
Thanks. I found out that I had to create the Logcaprequests with Mkdir and then c:\LogcapRequests\FLR-11-0005-CJ05-228-143217-R0\ with mkdir.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial