Protection

J

Jim Berglund

I just built an applet and want others to be able to use it. Essentially,
when you press the RUN button, it automatically opens 3 files located on
the users' desktop, based upon the answers he provides in two input boxes,
reformats, manipulates the data, eliminates unwanted data and then presents
the data to the user in a form he can use.

I only want the user to be able to input the two data elements, and use the
RUN button - nothing else. I don't even want the applet to be re-saved with
the new data shown - although I'd like him to be able to copy the processed
data into another file.

Is this possible? How can I do this?

Jim Berglund
 
A

AB

Not sure if i got your question right but how about
tools>protection>protect workbook?
Doesn't it do what you want?
 
J

Jim Berglund

I wish it was that easy... I tried that but get an error code when I press
the RUN button. Is there a way to allow the procedure to run (and change the
contents of cells) without allowing the user to mess with the data - or
anything else?

Jim
 
P

Project Mangler

Have you tried something like

Worksheets("Sheet1").Protect Password:="abc", UserInterfaceOnly:=True
 
A

AB

You could:
1. protect (as per earlier post by Prject Mangler) your wb or ws
(depending on what you want)
2. write your 'Run' code so that it:
2.1. unprotects the wb/ws
2.2. does the thing you want
2.3. re-protects teh wb/ws again.
Additional (not fool-proof) feature you can implement is you can
change your fileaccess to read-only on the fly, if you want to.

This way your file would be 'open' for user to mess about only during
the macro run time (during which they can't mess around with it) or
when it's read-only (and then you almost don't care).
 
P

Project Mangler

Hi AB,

I've seen this before - people suggesting that the code needs to
unprotect/write/re-protect.

The userinterfaceonly parameter allows code to modify the sheet, but not the
user.

Am I missing something?
 

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