Announcement

Collapse
No announcement yet.

Input box to display as ******

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Input box to display as ******



    Hi ,

    I am having the following code.

    Code:
    Dim PassProtect As Variant
        If pblnEnteredPassword Then GoTo DoStuff
        PassProtect = InputBox("Enter password to print calibration certificate soft copy" & vbCrLf, Title:="Control Panel")
          If PassProtect = vbNullString Then Exit Sub
        If PassProtect = "Boffice" Then
            pblnEnteredPassword = True
            GoTo DoStuff
        Else
            MsgBox Prompt:="Incorrect password. Please try again.", Buttons:=vbOKOnly
            Exit Sub
        End If
    DoStuff:
    In this when i enter my password it should display as ****** on my Inputbox

    Can any one please help me to solve this


  • #2
    Hello,

    In the properties of your TextBox.... use the PasswordChar field and insert an asterisk *

    Hope this will help
    If you feel like saying "Thank You" for the help received ...You can click on the "Like" icon ...just underneath ... ... in the bottom right corner ...

    Comment


    • #3
      Hi Carim,

      Can you explain me how to do this please

      Comment


      • #4
        Well you have designed a UserForm ... in this form there is probably the TextBox where the user needs to input his password ...

        If you open the Properties of this TextBox ... you will find PasswordChar ...

        Hope this clarifies
        If you feel like saying "Thank You" for the help received ...You can click on the "Like" icon ...just underneath ... ... in the bottom right corner ...

        Comment


        • #5
          I had created the user form

          But how to create the code for that

          Comment


          • #6
            Why don't you attach your file with your UserForm ...
            If you feel like saying "Thank You" for the help received ...You can click on the "Like" icon ...just underneath ... ... in the bottom right corner ...

            Comment


            • #7
              Dear Carim,

              Please find the attachment
              Attached Files

              Comment


              • #8
                Attached is the small modification for UserForm1 ...

                Hope this will help
                Attached Files
                If you feel like saying "Thank You" for the help received ...You can click on the "Like" icon ...just underneath ... ... in the bottom right corner ...

                Comment


                • #9
                  It is not working. When i am click on the button it is displaying letters only instead of ******

                  Comment


                  • #10
                    Just tested ... and it is working at my end ...

                    Which button are you talking about ...?
                    If you feel like saying "Thank You" for the help received ...You can click on the "Like" icon ...just underneath ... ... in the bottom right corner ...

                    Comment


                    • #11
                      Print soft copy & Print hard copy button on Data sheet.

                      Code:
                      Private Sub TextBox1_Change()
                      Me.TextBox1.PasswordChar = "*"
                      End Sub
                      But now i add the above code on userform. Now it is working

                      Comment


                      • #12
                        Glad you could fix your problem ...
                        If you feel like saying "Thank You" for the help received ...You can click on the "Like" icon ...just underneath ... ... in the bottom right corner ...

                        Comment


                        • #13
                          Thanks for your support

                          Comment


                          • #14
                            Dear carim,

                            I have one small problem in my excel.

                            Once i run the macro, In "Data" sheet Ctrl Z is not working if i modify any cells. can you please check it and clear my problem

                            Comment


                            • #15


                              Given the complexity of your event macro ... Undo is no longer available ...

                              Best solution is to close workbook without saving ... and re-open the last saved file ...

                              Hope this will help
                              If you feel like saying "Thank You" for the help received ...You can click on the "Like" icon ...just underneath ... ... in the bottom right corner ...

                              Comment

                              Working...
                              X