protect and unprotect sheet by user input

KalilMe

Board Regular
Joined
Mar 5, 2021
Messages
122
Office Version
  1. 2016
Platform
  1. Windows
hello

is there any way protect and unprotect the sheet based on input box? the first time when I select any cell then show input box I enter my password then protect the sheet and when select any cell shows the message has tow choice " do you want change the password " if press ok then show inputbox again and enter a new password and protect the sheet and if press no then show the inputbox and enter old password to unprotect the sheet if the password wrong after entering twice should show message " sorry you have only two tries " and close the inputbox with stay the active sheet and if the password is right then should unprotect the sheet but with considering when before close the file of course it will save the changes in sheets also protect based on the last password is entered
I hope my post is clear
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

vladimiratanasiu

Board Regular
Joined
Dec 17, 2010
Messages
81
Office Version
  1. 2019
Platform
  1. Windows
Sorry, but your message is rather confusing. Try to use punctuations, uppercases :)and short(er) sentences, in order to divide and make clear/ coherent the content of your long phrase. It's very useful if you want to be understood and get a response.
 
Last edited:

KalilMe

Board Regular
Joined
Mar 5, 2021
Messages
122
Office Version
  1. 2016
Platform
  1. Windows
I doubt my message is not clear even I don't use grammar or punctuation
anyway thank you for advice
 

Forum statistics

Threads
1,140,929
Messages
5,703,225
Members
421,285
Latest member
Bebek

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
Top