Hi All,
I use some code which I found here to unhide and unhide tabs which also requires a password, however I was wondering is there any way that when I enter the password it just shows up as ********** as it would in normal scenarios where you have a password as the below allows the letters to be shown and people can easily see me entering it thus defeating the purpose of the password in the first place. TIA
Sub UnhideAllSheets()
Dim ws As Worksheet
Dim sht As Object
Dim myPassword As String
myPassword = "Stroff2018" ' Set password here
Password = InputBox("Enter Password")
Application.ScreenUpdating = False
If Password = "" Then Exit Sub ' Exit if null input or cancel
' Incorrect password
If Password <> myPassword Then
MsgBox Title:="Warning", prompt:="Incorrect Password"
Exit Sub
End If
For Each ws In ActiveWorkbook.Worksheets
ws.Visible = xlSheetVisible
Next ws
Sheets("Data").Select
'Worksheets("Lists").Visible = xlSheetVeryHidden
Application.ScreenUpdating = True
End Sub
I use some code which I found here to unhide and unhide tabs which also requires a password, however I was wondering is there any way that when I enter the password it just shows up as ********** as it would in normal scenarios where you have a password as the below allows the letters to be shown and people can easily see me entering it thus defeating the purpose of the password in the first place. TIA
Sub UnhideAllSheets()
Dim ws As Worksheet
Dim sht As Object
Dim myPassword As String
myPassword = "Stroff2018" ' Set password here
Password = InputBox("Enter Password")
Application.ScreenUpdating = False
If Password = "" Then Exit Sub ' Exit if null input or cancel
' Incorrect password
If Password <> myPassword Then
MsgBox Title:="Warning", prompt:="Incorrect Password"
Exit Sub
End If
For Each ws In ActiveWorkbook.Worksheets
ws.Visible = xlSheetVisible
Next ws
Sheets("Data").Select
'Worksheets("Lists").Visible = xlSheetVeryHidden
Application.ScreenUpdating = True
End Sub