Error 70, Error 91 and error list separator
Hello!
I've got this problem:
I created a folder with visual basic
When I try to delete it(and only that dir...) with this code:
>Dim fso As FileSystemObject
>...
>fso.DeleteFolder defaultInstallFolder & "Config", True
I obtain "Permission denied", just like if folder is in use.. but it's in use from vb!
(The utility "Who lock me?" tells me that it's locked form vb)
I tried to change current dir to parent dir of folder to delete, but i didn't help.
If I try to delete directory just after have created, in another piece of code, the error changes:
"Object variable or With block variable not set"
I've read that perhaps it's a Microsoft bug, to solve using properties, so I made:
>Dim fso As FileSystemObject
> ...
> Public Property Get ob() As FileSystemObject
> ob = fso
> End Property
> Public Property Let ob(Object As FileSystemObject)
> fso = Object
> End Property
and tried to delete it using:
>Get ob.DeleteFolder defaultInstallFolder & "Config", True
but the error now is "Expected: list separator"
or I tried:
>Get ob().DeleteFolder defaultInstallFolder & "Config", True
>...
>Dim fso2 As FileSystemObject
>fso2 = Get ob (compile error)
The question is: HOW THE HELL CAN I DELETE THE FOLDER ? :-)
I can't understand the problem, I can easily delete other directories created in the same code 2-3 lines above, but THAT directory not. And neither in different Pcs, same problem.
I can only use vbcce5..
Thank you for responses!!
Re: Error 70, Error 91 and error list separator
Is there a running exe in the folder your trying to delete?
Re: Error 70, Error 91 and error list separator
I forgot to say it:
folder is empty!
Re: Error 70, Error 91 and error list separator
Is it on a local hard drive or a network drive?
Re: Error 70, Error 91 and error list separator
It's in a local drive, no network.
Re: Error 70, Error 91 and error list separator
What OS is this? Have you checked the inheritable permissions?