+ Reply to Thread
Results 1 to 2 of 2

hide password characters

  1. #1
    Forum Contributor
    Join Date
    06-27-2014
    Location
    bristol, england
    MS-Off Ver
    excel 2007
    Posts
    264

    hide password characters

    hi all
    am using the below code to protect a sheet from opening, what do I need to put in the code so as the password is entered asterisks appear instead of the actual password characters.

    many thanks
    scouse13

    [code]
    Private Sub CommandButton16_Click()

    Const strPass As String = "basket"
    Dim strPassCheck As String
    Dim IPassAttempts As Long

    Do Until IPassAttempts = 3
    IPassAttempts = 1 + IPassAttempts
    ICount = ICount + 1
    strPassCheck = InputBox("Password?", "Attempt " & IPassAttempts & "of 3")
    If strPassCheck = vbNullString Or IPassAttempts = 3 Then Exit Sub
    If strPassCheck = strPass Then Exit Do
    Loop

    Sheets("Maintenance").Select

    End Sub
    [code\]

  2. #2
    Registered User
    Join Date
    12-20-2015
    Location
    Israel
    MS-Off Ver
    2013
    Posts
    9

    Re: hide password characters

    using InputBox will not help you,

    you need to develop your own userform just for entering a password, and set a textbox property "PasswordChar" to "*"
    or in the code:
    TextBox1.PasswordChar = "*"

    Gil

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 03-09-2015, 11:45 AM
  2. Accessing My Spreadsheet - Password? Hide? Very Hide?
    By Sam Capricci in forum Excel General
    Replies: 4
    Last Post: 10-18-2014, 12:18 AM
  3. VBA to Unprotect (w/ password), Unhide, Hide, and Protect (w/ password)
    By pger34 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-14-2012, 12:35 PM
  4. [SOLVED] Astrix instead of password characters
    By abousetta in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-26-2012, 04:53 AM
  5. Hide Password
    By ukphoenix in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-21-2008, 03:05 AM
  6. Hide a password
    By edhaddock in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-05-2007, 12:48 PM
  7. change the characters entered in cell as a Password charactes
    By rajendran in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-07-2005, 10:00 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1