Macro VBA hide/unhide with veryHidden option and VBA password

alexbw

New Member
Joined
Dec 11, 2014
Messages
9
Office Version
  1. 365
Platform
  1. Windows
Hi to all,

after spending a lot of time and that i am not a macro expert i thought to ask here for help

To keep it sort the problem is the following

Excel workbook with 10 sheets

Sheet1 is for sales team that fill out data in some areas ( the sheet is sheetprotect ) , no worries about this sheet , i am ok.
Sheet2 same as Sheet1
Sheet3 until Sheet9 is filled with reports-charts etc for sales directors that take data from Sheet1 and Sheet2 , need to be hidden from sales team , but sales directors need to see.
Sheet10 , filled with cost and data that only top management need to see .

My thinking and top management agreed is to structure the file like below :

In sheet1 create 2 buttons assigned with macros
First button when clicked to unhide from sheet3 to sheet9 (sheets for sales directors)
Second button when clicked to unhide sheet10 (sheet for top management )

Both of them need to prompt with message to put a password before show the relevant sheets.

The second button need make veryhidden sheet10 so nobody can see that sheet10 exist.

And last , need another macro that make the opposite , hidden the Sheet10(verryhidden) and sheets from 3-9 and save the file ( i will put a button in sheet10 labeled "save and hide Sheets" ) ,
and same for sheets from 3-9 , in each sheet i will put button that save and hide all sheets 3-9 and save the file.

I already know that passwords will be hardwritten in code , no problem about that.

PS. need also that VBA project password protection , so no one can see the passwords

Thanks in advance for any help
 
Last edited:

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
PS. need also that VBA project password protection , so no one can see the passwords, i am writing this because i dont know if needed to be inserted in the code also , if not its ok , i wll lock the vba
 
Upvote 0

Forum statistics

Threads
1,224,811
Messages
6,181,081
Members
453,021
Latest member
Justyna P

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