Hallo, I just saw the video from TeachExcel about hide and unhiding sheets. But I don't know how to integrate the code from the link video to Mask the password from this exisiting code in Password Protect of hide and unhiding sheets.Please help me. Thank you.
Sub ViewSheet() ' Code from: https://www.TeachExcel.com ' ' Unlock/show the worksheet if the user inputs the correct password. ' Variables. Dim userInput As Variant ' Ask the user for the password to unlock the sheet. userInput = InputBox( _ Prompt:="Input a password to unlock the worksheets.", _ Title:="Password Input", _ Default:="Password") ' Check if the correct password was input. ' - Trim() removes any space that might have been accidentally added to the ' start or end of the password. ' - LCase() ensures that a case-insensitive check is being performed because ' it converts the input and the password both to lower case. If LCase(Trim(userInput)) = LCase(conSheetPassword) Then ' Pass - all is good. ' Show the Sheet. Sheets("Helper").Visible = xlSheetVisible Sheets("Raw").Visible = xlSheetVisible ' Go to the sheet. Sheets("Helper").Select
The following are the URL of the video I watched.
https://www.youtube.com/watch?v=bMAlW_U24tk Password Protect & Hide Worksheet
https://www.youtube.com/watch?v=Y2k3uAM6N-A Make a Password Promt in Excel
My concern is I am a newly learning on VBA coding. And as of the moment I don't know how to integrate that 2 videos in once code to solve my concern.
Thank you so much for helping.