Link to home
Start Free TrialLog in
Avatar of Bryce Bassett
Bryce BassettFlag for United States of America

asked on

Can you prevent user from deleting a file when using msoFileDialogOpen?

In VBA macros, I frequently use

Open in new window

to prompt the user to select a file from a specific folder.  

Is there a way to prevent them from deleting a file (accidentally or intentionally) while searching for one to open?

Avatar of Bryce Bassett
Bryce Bassett
Flag of United States of America image


Piggybacking on my own question.  I also don't want the user to be able to navigate to any other folders.  Bottom line, I want to limit them to "read only" access to the folder I choose.

If the answer is I need to create my own dialog listing files in the target folder, rather than use the built in File Open dialog, I could do that.  But I prefer the simplest approach.

Thanks again.
Avatar of strivoli
Did you consider setting the File System Permissions?
Avatar of Fabrice Lambert
Fabrice Lambert
Flag of France image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks, I suspected the answer was no I don't have such control when using the standard dialog.  This is an enterprise-wise application, so it would not be possible for me to control permissions.  Thanks, both.