AnsweredAssumed Answered

VB button programming

Question asked by MOHAMEDMUSTHAFA on Aug 14, 2019
Latest reply on Aug 14, 2019 by gregor

i have configured a VB button in Process book with password  see the below code, i am facing an issue that the password is visible while typing the password (test) , how can i make ****   while typing the password 

 

Private Sub CommandButton1_Click()

strPassword = "test"

For lTries = 1 To 3
strPassTry = InputBox("Enter Password please", "RUN MACRO")
If strPassTry = vbNullString Then
Exit Sub
End If
bSuccess = strPassword = strPassTry
If bSuccess Then Exit For
MsgBox "Password incorrect"
Next lTries

If Not bSuccess Then
MsgBox "Wrong password supplied!"
Exit Sub
End If

If bSuccess Then
Set pipb = GetObject(, "piprocessbook.application.2")
Set disp = pipb.Displays.Open("\\10.6.60.144\yanbu\MAINTENANCE\DCS SECTION\PI\Displays\ITMonitor\DCSSECTION.PDI").Symbols
End If
End Sub

Outcomes