By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,635 Members | 2,243 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,635 IT Pros & Developers. It's quick & easy.

MkDir "Path/File error"

P: 52
I wanted to create a subfolder in a directory and I used the MkDir statement but it gives me an error like "Path/File access error"

Here are the codes:

MkDir "\\BC123456\Attachments\" & Me.UniversityID.Value

BC123456 = shared computer
Attachments = shared folder
Me.UniversityID = is a text box on the form with a number format

I tried to use the Str() function but still it gives me an error. I even tried this:

Dim strUniversityNo as string
strUniversityNo = Me.UniversityID
MkDir "\\BC123456\Attachments\" & strUniversityNo

But still this doesn't work.

Please help.
Sep 5 '06 #1
Share this Question
Share on Google+
3 Replies

Expert 100+
P: 1,418


MkDir "\\BC123456\Attachments\" & Mid(str(Me.UniversityID.Value),2,len(str(Me.Univer sityID.Value)))
Sep 5 '06 #2

Expert 100+
P: 1,418
Also you can try to add one or two letters before the number!

And finally something that can work is to map a network drive in Windows Explorer and Assign to this shared computer a letter For exemple Y

Then create mkdir with the specified letter!

Some commands don't use the path like \\Server\bla\blla and are done to search for a drive!

Have a nice luck!
Sep 5 '06 #3

P: 1
Check that access to your shared folder is available (folder location and file permissions).

(don't forget that mkdir instruction allows you to create a single folder at once)
Oct 13 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.