Forum

Notifications
Clear all

VBA & Password Protection

2 Posts
2 Users
0 Reactions
85 Views
(@philipk55)
Posts: 1
New Member
Topic starter
 

Hi there,

Is there a way unhide certain sheets in a workbook based on a user inputting his/her username and password into a login sheet?

 

Ideally i'd like the sheets unhidden based on a table i have in another sheet which has the username in column A and the sheet name in column B. So upon successful password access it would loop through and open each sheet that matches the username.

 

Or if there is an easier alternative that would be great.

 

Cheers,

 

Philip

 
Posted : 19/10/2017 8:04 pm
(@sunnykow)
Posts: 1417
Noble Member
 

Hi Philip

What you requested is very tricky to handle and need to take into consideration many scenarios. It is not fool-proof.

Saving password together with a workbook is not very safe. You will need to consider when to hide sheets opened by the previous user.

You cannot force a save before exit as user may not want to save changes. I use a workbook open event to hide all sheets except two.

You will need to modify the codes to hide the setup sheet where all the passwords are stored once you finish the testing.

Good luck.

Sunny

 
Posted : 21/10/2017 3:00 am
Share: