• Entering Passwords (VBA / Excel 2000 / SP3)

    Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » Entering Passwords (VBA / Excel 2000 / SP3)

    Author
    Topic
    #412437

    I am using the Inputbox to accept a password from the user. Does anyone have a snippet of code to mask the input; or another method of accepting input that doesn’t expose the response?

    Viewing 3 reply threads
    Author
    Replies
    • #901829

      If this is for a workbook or worksheet, can you use the:

      Application.Dialogs(xlDialog…).Show

      Method with xlDialogWorkbookProtect or xlDialogProtectDocument arguments?

      • #902091

        John
        Thanks for the response. The password is being used to allow the VBA procedure to continue. But fear not; your post was enlightening.

      • #902092

        John
        Thanks for the response. The password is being used to allow the VBA procedure to continue. But fear not; your post was enlightening.

    • #901830

      If this is for a workbook or worksheet, can you use the:

      Application.Dialogs(xlDialog…).Show

      Method with xlDialogWorkbookProtect or xlDialogProtectDocument arguments?

    • #902065

      You can build a simple enough userform to achieve what you want. The standard TextBox available for userforms has a PasswordChar property which can be set to an asterisk or any other suitable character.

      Sample attached.

      Andrew C

    • #902066

      You can build a simple enough userform to achieve what you want. The standard TextBox available for userforms has a PasswordChar property which can be set to an asterisk or any other suitable character.

      Sample attached.

      Andrew C

    Viewing 3 reply threads
    Reply To: Entering Passwords (VBA / Excel 2000 / SP3)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: