Results 1 to 4 of 4
  1. #1
    Bronze Lounger
    Join Date
    Feb 2008
    Posts
    1,420
    Thanks
    124
    Thanked 5 Times in 5 Posts

    Entering Password in Macro to appear as ********** (Excel 2007`)

    I have set up a form with the following macro with a password. The Macro works fine, but When the user enters the password it appears on the screen. I want the password to be seen as ************ on the screen. Please amend my macro, so that when the user enters the password, it appears as ********** on the screen

    Your assistance will be most appreciated

    See my code below

    Private Sub CommandButton1_Click()
    If Me.txtpass.Value <> "Mike1" Then
    MsgBox "Incorrect Password!"
    Exit Sub
    Else
    Me.Label3.Visible = True: Me.Label4.Visible = True
    Me.ComboBox1.Visible = True
    Me.CommandButton2.Visible = True
    Me.ComboBox2.Visible = True
    End If
    End Sub

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Entering Password in Macro to appear as ********** (Excel 2007`)

    If you set the PasswordChar property of the txtPass text box to <code>*</code>, the user will see ****** instead of the password.
    Attached Images Attached Images
    • File Type: png x.png (4.6 KB, 0 views)

  3. #3
    Bronze Lounger
    Join Date
    Feb 2008
    Posts
    1,420
    Thanks
    124
    Thanked 5 Times in 5 Posts

    Re: Entering Password in Macro to appear as ******

    Hi Hans

    Has set PasswordChar to * and when Form is activated , you can still see the name of password being entered.

    Any idea on how to rectify this?

    Regards

    Howard

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Entering Password in Macro to appear as ******

    Sorry, I can't explain that - it works OK for me in Excel 2002 and 2003.

    It might be a quirk in Excel 2007 - perhaps someone who has Excel 2007 can test it.
    Attached Images Attached Images
    • File Type: png x.png (4.9 KB, 0 views)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •