View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default MkDir Simply Not Creating Folders

Ron,

I haven't installed Vista yet. Is there an issue with MkDir?


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)


"Ron de Bruin" wrote in message
...
Are you on Vista ?

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


wrote in message
oups.com...
Sorry, this new interface on Google Groups just posted on it's own...
anyway...

Notice I've commented out the error handling to try and force an error.
sProfileName is a string, of course, and sPath is empty on purpose for
testing. I just want to create a "test" folder on the C drive and it's
not working, causing an error, or anything.

Any help is hugely appreciated!!

Cory

On Jan 24, 12:44 pm, "
wrote:
I know this will sound odd, but the MkDir function isn't creating
folders... and it isn't throwing any errors.

I don't have any "On Error Resume Next" anywhere in my code. It just
isn't creating any folders. The folder doesn't already exist and it
isn't trying to create multi-level folder structures or anything like
that. I just want to create a folder named "test" on my root drive
(C:\ in this case). Here's the code:

Private Sub CreateFolder()

sProfileName = "C:\test"
'On Error GoTo folderexists
MkDir sPath & sProfileName
'Exit Sub

'folderexists:
'Exit Sub
End Sub