ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Password (https://www.excelbanter.com/excel-worksheet-functions/83022-password.html)

Param

Password
 
Hi, I am using macro to display below password input box:
--------------------------------------------------------------------------
Sub open()
myPWD = Application.InputBox("Password Protected! Please Enter Authorized
Password to Continue!")
If myPWD = "123456" Then
Sheets("S1").Select
Else
MsgBox "Wrong Password! Bye!"
End If
End Sub
-------------------------------------------------------------------------
My question: It works fine, but when I type password it not show in *****
but display the number I type. How to change in asterik (*)

TQ
Param

Mikeopolo

Password
 

Haven't tested this, suggest use the passwordchar property before
displaying the inputbox, eg

Application.inputbox.passwordchar="*"

Regards
Mike


--
Mikeopolo
------------------------------------------------------------------------
Mikeopolo's Profile: http://www.excelforum.com/member.php...o&userid=18570
View this thread: http://www.excelforum.com/showthread...hreadid=532504


Param

Password
 
not working, or I dont know how to set the command. pls correct me.

Sub closescreentarget()
Application.InputBox.passwordchar = "*"
myPWD = Application.InputBox("Password Protected! Please Enter Authorized
Password to Continue!")
If myPWD = "ems97188" Then
Dim wbk As Workbook
Workbooks.Open ActiveWorkbook.Path & "\setup.xls"
Else
MsgBox "Wrong Password! Bye!"
End If
End Sub


"Mikeopolo" wrote:


Haven't tested this, suggest use the passwordchar property before
displaying the inputbox, eg

Application.inputbox.passwordchar="*"

Regards
Mike


--
Mikeopolo
------------------------------------------------------------------------
Mikeopolo's Profile: http://www.excelforum.com/member.php...o&userid=18570
View this thread: http://www.excelforum.com/showthread...hreadid=532504




All times are GMT +1. The time now is 04:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com