Password Protecting Sheets via VBA

mattpfc

Active Member
Joined
Nov 21, 2002
Messages
299
Hi all,

I have a large spreadsheet with 24 sheets of information, two for each month throuout the year. The first twelve (jan-dec) are to be used and veiwed be the administrator only and so I need to put a password on these sheet that stops all other users from seeing the information.

The first 12 sheets control the second 12 sheets via VLOOKUP and HLOOKUP but only display non sensitive information. So basicly anybody can view the non sensitive data sheets but only the administrator can view the sheets with sensitive data.

I have viewed the Microsoft help but that only shows sheet protection which stops people from making changes, I need sheet protection which stops users from actually viewing the sheet.

Could anybody provide me with a VB/VBA script that will enable this.

Any help will be greatly appreciated.
 

Forum statistics

Threads
1,224,875
Messages
6,181,513
Members
453,050
Latest member
Obil

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