ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro to View Protected Sheet (https://www.excelbanter.com/excel-programming/289396-macro-view-protected-sheet.html)

Glenn

Macro to View Protected Sheet
 
I have a workbook which is a shared workbook. The
workbook contains 2 worksheets and a user form. The 1st
sheet is like a main menu, and the 2nd sheet contains the
information extracted from the user form. I don't want any
sheet tabs at the bottom.
I want to put a macro on the main menu (sheet1) that when
pushed will prompt for a password and if it is correct
will show "Sheet 2" if the password entered is incorrect
it will just stay on Sheet 1

Cliff Myers

Macro to View Protected Sheet
 
To hide the sheet tabs go to tools|options| and under the view tab uncheck
sheet tabs. Then add your command button on sheet1, right click, click view
code, then add:
Your code for entering a password. You can either use an Input box (the
password will be viewable for those looking over the shoulder of the user)
or you can make up a userform with a textbox (set its password character
property to *, or ? and your choice. The userform is better for password
invisibility. And I think it's easier to write code for a correct or
incorrect password.

HTH
"Glenn" wrote in message
...
I have a workbook which is a shared workbook. The
workbook contains 2 worksheets and a user form. The 1st
sheet is like a main menu, and the 2nd sheet contains the
information extracted from the user form. I don't want any
sheet tabs at the bottom.
I want to put a macro on the main menu (sheet1) that when
pushed will prompt for a password and if it is correct
will show "Sheet 2" if the password entered is incorrect
it will just stay on Sheet 1





All times are GMT +1. The time now is 12:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com