Application.FileDialog(msoFileDialogOpen) and error 75

H

H.A. de Wilde

every time I try to rename a folder (name xxx as yyy) error 75 occurs if
the folder was opened before with
Application.FileDialog(msoFileDialogOpen). It seems that there is a
lock during the whole Excel-session. Is there away to avoid this error
75?
 
H

H.A. de Wilde

Dear Mudraker,

thanks for your reply.
Now I found out that the folder that was last accessed with the
FileDialog, is set by Windows as the Current Directory. And it seems
that renaming the Current Directory is not allowed.
When I change the Current Directory (ChDir left(CurDir,3)) then I can
rename my folder.
Maybe this is also a solution for the cases you encountered problems
with renaming a folder that was last accessed before with the
FileDilog.

Kind regards,

hugo de wilde
 
M

mudraker

hugo

I was not aware of the exact cause of the problem. Unlocker did tell me
that Excel had the folder of file locked.

As this usually occurs when I run a macro I will now change the macro
code to change folders at the end.

Thanks for the feed back
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top