VBA - restrict access to specific sheet on shared document

MisterProzilla

Active Member
Joined
Nov 12, 2015
Messages
264
Hi all,

I have a shared workbook, in which a certain sheet contains confidential information. I want to restrict access, if not to the entire doc, then at least to this sheet. Just after some advice if anyone has done this before :)


  • The first problem is that I can't encrypt the whole doc with a password as it's a shared file, so that option's out.
  • On opening the confidential worksheet, I've using VBA to hide all data and request a password - if entered incorrectly, you're kicked back to the front sheet. However, it only works if macros are enabled, so anyone could open the workbook and bypass security by just ... not enabling it.
  • I can set up a secure splash page; this is where all sheets are hidden with VBA on closing except a front splash page - on opening you see the splash page with a button to unlock & unhide sheets, so you're forced to enable macros in order to use the button and gain access. Only issue here is that, on a shared workbook, I don't know how one person closing & hiding all sheets will affect another user with it open at the same time. Also, macros could just be disabled after the button is used, so there's that too - I guess I could just set the password at this point so it's effectively encrypting it in a roundabout way.

Any advice on this? It's stored on a fairly secure shared drive so it's not as if it's just lying around on desktop, but with new data protection laws coming in soon it's important that I make it as secure as possible first time :)

Thanks for looking
 
Last edited:

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
You can't do this securely, it's not possible. Excel VBA security is trivially easy to bypass - if it really is confidential, then although it may not be what you want to hear, you're using the wrong tool.

If you require a password to open (even though you appear to have ruled it out), it is many orders of magnitude more secure than any of your proposed solutions.
 
Upvote 0
I'm happy to rule it in if possible :) But it seems that shared workbooks don't support encryption (one of their many limitations). You're right, this document would be much better suited to a database, but as I'm unfamiliar with Access I'd like to avoid having to rebuild it if possible. I've managed to bootstrap a (very inefficient) relational database in Excel, only realising afterward that Access would have been better :(
 
Upvote 0

Forum statistics

Threads
1,215,432
Messages
6,124,856
Members
449,194
Latest member
HellScout

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top