Could someone please help me to mask the password entered to the input box generated using the below code. I will be using Office 365 ProPlus.
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim sPassCheck As String
Dim rng As Range
Dim sTemp As String
Dim sPassword As String
sPassword = "12345"
sTemp = "You must enter the password to delete data"
' Check if target is within Range N6:N100000
If Intersect(Target, Range("N6:N100000")) Is Nothing Then
If Target.Count > 1 Then
Set rng = Target.Cells(1, 1)
Else
Set rng = Target
End If
If rng.Value = "" Then
sPassCheck = InputBox(sTemp, "Delete check!")
Application.EnableEvents = False
If sPassCheck <> sPassword Then Application.Undo
End If
End If
Application.EnableEvents = True
End Sub
Above link on comment should solve your problem. Here is like same codes. First copy and past below codes to a module
Then call
PasswordBox()function from any where in workbook like.