ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   No need to password protect a sheet? (https://www.excelbanter.com/excel-programming/448673-no-need-password-protect-sheet.html)

Robert Crandal[_2_]

No need to password protect a sheet?
 
If a user tries to modify my sheet, my VBA code immediately
shows a userform which asks for a passwords to get access
to the sheet....

So, I've been thinking... would it be better to just scan the
Environ("Username") info and only automatically give access to
select users?? It saves the need of prompting for passwords
every time. Is this a reliable solution? What problems might
arise from this solution?

Thanks.



Auric__

No need to password protect a sheet?
 
Robert Crandal wrote:

If a user tries to modify my sheet, my VBA code immediately
shows a userform which asks for a passwords to get access
to the sheet....

So, I've been thinking... would it be better to just scan the
Environ("Username") info and only automatically give access to
select users?? It saves the need of prompting for passwords
every time. Is this a reliable solution? What problems might
arise from this solution?


Having to maintain a list of authorized editors might be a problem.

--
They instruct me to, "Use the block button."
I instruct them to, "Stop shooting me, asshole!"

GS[_2_]

No need to password protect a sheet?
 
If a user tries to modify my sheet, my VBA code immediately
shows a userform which asks for a passwords to get access
to the sheet....

So, I've been thinking... would it be better to just scan the
Environ("Username") info and only automatically give access to
select users?? It saves the need of prompting for passwords
every time. Is this a reliable solution? What problems might
arise from this solution?

Thanks.


The most reliable way is to use built-in sheet protection. If users are
not supposed to make unauthorized modifications to your sheet[s] then
the presumed inconvenience of being prompted for a password is a mute
point, IMO.

On the other hand, using Environ to qualify logged in users for
authorization is a nice touch since you can compare that to a stored
delimited string list of usernames via the InStr() function fairly
easily. I agree with Auric_ though, that the list might be problematic
to maintain.

I implement something similar by department, where different depts in
an organization has different accessibility to the project's
features/functionality/reporting. This is handled by a startup login
prompt and all permissions are set from the start because this
determines what menus are available during the runtime. I doubt I'd
ever want to do this automatically since users can be switched at any
time. Thus, I recommend a login methodology at starup so that's out of
the way during the runtime.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion



Robert Crandal[_2_]

No need to password protect a sheet?
 
"GS" wrote in

The most reliable way is to use built-in sheet protection. If users are
not supposed to make unauthorized modifications to your sheet[s] then
the presumed inconvenience of being prompted for a password is a mute
point, IMO.

On the other hand, using Environ to qualify logged in users for
authorization is a nice touch since you can compare that to a stored
delimited string list of usernames via the InStr() function fairly
easily. I agree with Auric_ though, that the list might be problematic
to maintain.


We only have two supervisors who will have special editing
privileges. All other users will have very limited privileges to the
workbook. So, in my case, the list of users to maintain will always
be very small... but ya, I agree with you and Auric that if my list
of users was large and non-static, then maintaining a user
list would be problematic.

Thanks for the ideas Auric and GS.




All times are GMT +1. The time now is 01:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com