Forum

Notifications
Clear all

Hidden sheet

21 Posts
6 Users
0 Reactions
344 Views
(@dritan0478)
Posts: 34
Trusted Member
Topic starter
 

Hi to all,

How can I make an Excel sheet visible to a user, but invisible to the other one.

So if I have a excel file with 5 sheets, I want in this file to work 5 other users but each of the user can see only one page not all the page?

How can I restricted this?

Any help please?

Best Regards,

Dritan

 
Posted : 11/09/2018 5:27 am
(@fravis)
Posts: 337
Reputable Member
 

I think best is to copy the sheets for each person to a different file.

You can also hide the four for person nr. 1, but you also have to make a copy of the file, unhide the four and then hide the other four for person nr. 2.

So that´s even more work.

Don´t know of a system where you can ´automate´ this hiding.

Frans

 
Posted : 11/09/2018 1:58 pm
Anders Sehlstedt
(@sehlsan)
Posts: 970
Prominent Member
 

Hello Dritan,

Personnally I would do as Frans suggests, giving each person a copy of the file containing only their sheet. I would then use Power Query to gather the data from the different files and so forth.

But to answer your question. There are some methods you can use, check out the blog articles for two different approaches.

https://www.myonlinetraininghub.com/interactive-excel-web-app-dashboard

https://www.myonlinetraininghub.com/hide-delete-and-sort-sheets-with-vba-userform

Br,

Anders

 
Posted : 11/09/2018 6:41 pm
(@dritan0478)
Posts: 34
Trusted Member
Topic starter
 

Hi Anders,

Thank you for your answer,

I would need that the excel file to pop-up with a windows form that required to fill Username and a password on the form, after the Username and the password is enter than excel open the sheet for a correspondent user.

 
Posted : 12/09/2018 3:12 am
(@sunnykow)
Posts: 1417
Noble Member
 

Hi Dritan

What you asked for is quite complicated and not fool-proof.

I am assuming you know a bit of VBA as you will need to maintain the file yourself.

The username, password and worksheet name is stored in the Setup sheet which is hidden.

Modify to suit your needs.

Good luck.

Sunny

 
Posted : 12/09/2018 10:24 pm
(@dritan0478)
Posts: 34
Trusted Member
Topic starter
 

Hi SunnyKow,

Great work 🙂

Here is my need

I would like when I open the file and when i pres the button "Login" I want a small window pops-up. In the windows on the left side I would like to have an drop down box, when I can select the list of the user, than in the right side Password.

The other things that I need, is that possible to add users, and sheet?

I'm not finding the password?

Could I have the VBA code about this file?

best regards,

Dritan

 
Posted : 13/09/2018 2:47 am
 Madi
(@madisal66)
Posts: 61
Trusted Member
 

Hi Sunny

how to not open sheet, bcoz already hide sheet i have opened i want to protect user1 and other also

 

Thanks/Saliha

 
Posted : 13/09/2018 2:54 am
(@sunnykow)
Posts: 1417
Noble Member
 

@Dritan

The codes are not hidden. You can view them by pressing ALT+F11.

The username, password and worksheet name is stored in the Setup sheet which is hidden.

You can add users, assign passwords and new sheets if needed. 

You may want to make the sheets very hidden so that casual users will not he able to unhide the sheet manually.

This option is available in the VBA codes. You will also need to password protect the VBA codes.

Like I said earlier, if you wanted a VBA solution you will need to know some VBA. Otherwise you will have difficulty maintaining the file.

 

@Saliha

I don't understand what you wanted. If you wanted to hide the sheet that was already open (eg User1) , you only need to select the Main sheet.

This will automatically hide all other sheets.

Sunny

 
Posted : 13/09/2018 8:41 pm
(@sunnykow)
Posts: 1417
Noble Member
 

I have modified the file and added Admin as one of the user. The password is Admin. You can change it later if you wish.

Only the Admin can see the Setup sheet where you can add/remove users and assign/change their password and sheet access etc.

There is also a button to unhide all sheets for you to maintain them. You can then auto hide them by activating/selecting the Main sheet.

All sheets (other than Main) have been set to very hidden so that users cannot see and unhide them (unless they use VBA).

You will still need to protect the VBA project to prevent users from accessing the codes. It is currently unprotected.

Please do not rename the Main sheet.

Sunny

 
Posted : 14/09/2018 12:30 am
(@dritan0478)
Posts: 34
Trusted Member
Topic starter
 

Hi Sunny,

Awesome work :), thank you for your contribution.

Here I have some basic question related with VBA which I know a bit.

Can you provide me to protect the VBA project to prevent users from accessing the codes?

I put it in screenshot on a word document about some code that you put it to the file.

 

Thank you so much for your support,

Dritan

 
Posted : 14/09/2018 3:45 am
(@sunnykow)
Posts: 1417
Noble Member
 

Hi Dritan

Protecting your Project

  • Press ALT-F11
  • Select Tools-VBAProject Properties…
  • Select the Protection tab
  • Check Lock project from viewing
  • Enter your Password and Confirm password
  • Click OK

 

Answering your questions:

  • Option Explicit – You need to declare all your variables before you can use it else it will flag as an error.
  • That code will hide all worksheets other than Main when the file is opened. Just in case someone saved the file with their worksheet visible.
  • Password – password to open the file
  • WritePassword - password to modify the file
  • That code will unhide all worksheets.

Password & WritePassword above can be set when you save the file with File – Save As – Tools – General Options

Hope this is clear enough.

Sunny

 
Posted : 14/09/2018 4:52 am
 Madi
(@madisal66)
Posts: 61
Trusted Member
 

 i got the answer from your above message and thanks

 
Posted : 14/09/2018 5:31 am
(@dritan0478)
Posts: 34
Trusted Member
Topic starter
 

Thank you Sunny,

Super 🙂

 
Posted : 14/09/2018 5:53 am
(@sunnykow)
Posts: 1417
Noble Member
 

Hi Dritan/Saleha

No problem Laugh

Glad to know it is helpful.

Sunny

 
Posted : 15/09/2018 3:50 am
(@dritan0478)
Posts: 34
Trusted Member
Topic starter
 

Thank you once again.

What if I want to make it this file available in Google.doc? So the users can enter and edit their restricted sheet form distance?

This will be very useful.

 

Best Regards,

Dritan

 
Posted : 15/09/2018 5:08 am
Page 1 / 2
Share: