Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 32
Default Userform password to show "xxxxxx" in the text box

Can someone please help me here. When entering password or authourised
code in the text box, I would like it to show xxxxxx and not display
the password. Please see below the vb code i am working on.

Many thanks for any help.

Ola.

Option Explicit
Dim sPrompt As String
Dim vPW As Variant
Public cntr As Integer




Private Sub Cmdok_Click()
If TxtPW.Value = "55555" Then
frmAuthorisation.Hide
Call CreateTemplate
Me.lbldone.Caption = "A total of " & iWCount & " workbooks" _
& " containing a total of " & iCCount & " worksheets created."
Me.lbldone.Visible = True
frmAuthorisation.Show


Else
cntr = cntr + 1
If cntr = 2 Then

MsgBox "SORRY..YOU HAVE ENTERED AN INCORRECT
PASSWORD...GOODBYE!!!"
ThisWorkbook.Saved = True
ThisWorkbook.Close


End If
End If

End Sub



Private Sub lbldone_click()

End Sub

Private Sub Label1_Click()

End Sub

Private Sub cmdcancel_Click()
Unload frmAuthorisation
End Sub

Private Sub TxtPW_Change()

End Sub

Private Sub UserForm_Click()

End Sub

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Userform password to show "xxxxxx" in the text box

One of the Properties of a text box is "Password Character: set this to (for
example) "*" (no quotes needed)

HTH

"Ola2B" wrote:

Can someone please help me here. When entering password or authourised
code in the text box, I would like it to show xxxxxx and not display
the password. Please see below the vb code i am working on.

Many thanks for any help.

Ola.

Option Explicit
Dim sPrompt As String
Dim vPW As Variant
Public cntr As Integer




Private Sub Cmdok_Click()
If TxtPW.Value = "55555" Then
frmAuthorisation.Hide
Call CreateTemplate
Me.lbldone.Caption = "A total of " & iWCount & " workbooks" _
& " containing a total of " & iCCount & " worksheets created."
Me.lbldone.Visible = True
frmAuthorisation.Show


Else
cntr = cntr + 1
If cntr = 2 Then

MsgBox "SORRY..YOU HAVE ENTERED AN INCORRECT
PASSWORD...GOODBYE!!!"
ThisWorkbook.Saved = True
ThisWorkbook.Close


End If
End If

End Sub



Private Sub lbldone_click()

End Sub

Private Sub Label1_Click()

End Sub

Private Sub cmdcancel_Click()
Unload frmAuthorisation
End Sub

Private Sub TxtPW_Change()

End Sub

Private Sub UserForm_Click()

End Sub


  #3   Report Post  
Posted to microsoft.public.excel.misc
LT LT is offline
external usenet poster
 
Posts: 25
Default Userform password to show "xxxxxx" in the text box

On Mar 15, 6:40 am, Toppers wrote:
One of the Properties of a text box is "Password Character: set this to (for
example) "*" (no quotes needed)

HTH



"Ola2B" wrote:
Can someone please help me here. When entering password or authourised
code in the text box, I would like it to show xxxxxx and not display
the password. Please see below the vb code i am working on.


Many thanks for any help.


Ola.


Option Explicit
Dim sPrompt As String
Dim vPW As Variant
Public cntr As Integer


Private Sub Cmdok_Click()
If TxtPW.Value = "55555" Then
frmAuthorisation.Hide
Call CreateTemplate
Me.lbldone.Caption = "A total of " & iWCount & " workbooks" _
& " containing a total of " & iCCount & " worksheets created."
Me.lbldone.Visible = True
frmAuthorisation.Show


Else
cntr = cntr + 1
If cntr = 2 Then


MsgBox "SORRY..YOU HAVE ENTERED AN INCORRECT
PASSWORD...GOODBYE!!!"
ThisWorkbook.Saved = True
ThisWorkbook.Close


End If
End If


End Sub


Private Sub lbldone_click()


End Sub


Private Sub Label1_Click()


End Sub


Private Sub cmdcancel_Click()
Unload frmAuthorisation
End Sub


Private Sub TxtPW_Change()


End Sub


Private Sub UserForm_Click()


End Sub- Hide quoted text -


- Show quoted text -


I am also interested in showing XXXX instead of the actual password.
It's great that I learned with your help that I can do this with
editing the textbox's properties, but how do you or could you apply
this to a standard msgbox?

Thanks!

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Userform password to show "xxxxxx" in the text box

You can't apply this to a message box which only used for output not input
(so I don't understand how you think this can be applied).

Perhaps an example of what you want might help.

"LT" wrote:

On Mar 15, 6:40 am, Toppers wrote:
One of the Properties of a text box is "Password Character: set this to (for
example) "*" (no quotes needed)

HTH



"Ola2B" wrote:
Can someone please help me here. When entering password or authourised
code in the text box, I would like it to show xxxxxx and not display
the password. Please see below the vb code i am working on.


Many thanks for any help.


Ola.


Option Explicit
Dim sPrompt As String
Dim vPW As Variant
Public cntr As Integer


Private Sub Cmdok_Click()
If TxtPW.Value = "55555" Then
frmAuthorisation.Hide
Call CreateTemplate
Me.lbldone.Caption = "A total of " & iWCount & " workbooks" _
& " containing a total of " & iCCount & " worksheets created."
Me.lbldone.Visible = True
frmAuthorisation.Show


Else
cntr = cntr + 1
If cntr = 2 Then


MsgBox "SORRY..YOU HAVE ENTERED AN INCORRECT
PASSWORD...GOODBYE!!!"
ThisWorkbook.Saved = True
ThisWorkbook.Close


End If
End If


End Sub


Private Sub lbldone_click()


End Sub


Private Sub Label1_Click()


End Sub


Private Sub cmdcancel_Click()
Unload frmAuthorisation
End Sub


Private Sub TxtPW_Change()


End Sub


Private Sub UserForm_Click()


End Sub- Hide quoted text -


- Show quoted text -


I am also interested in showing XXXX instead of the actual password.
It's great that I learned with your help that I can do this with
editing the textbox's properties, but how do you or could you apply
this to a standard msgbox?

Thanks!


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Userform password to show "xxxxxx" in the text box

If you mean a standard inputbox, then the answer is you can't.

LT wrote:

On Mar 15, 6:40 am, Toppers wrote:
One of the Properties of a text box is "Password Character: set this to (for
example) "*" (no quotes needed)

HTH



"Ola2B" wrote:
Can someone please help me here. When entering password or authourised
code in the text box, I would like it to show xxxxxx and not display
the password. Please see below the vb code i am working on.


Many thanks for any help.


Ola.


Option Explicit
Dim sPrompt As String
Dim vPW As Variant
Public cntr As Integer


Private Sub Cmdok_Click()
If TxtPW.Value = "55555" Then
frmAuthorisation.Hide
Call CreateTemplate
Me.lbldone.Caption = "A total of " & iWCount & " workbooks" _
& " containing a total of " & iCCount & " worksheets created."
Me.lbldone.Visible = True
frmAuthorisation.Show


Else
cntr = cntr + 1
If cntr = 2 Then


MsgBox "SORRY..YOU HAVE ENTERED AN INCORRECT
PASSWORD...GOODBYE!!!"
ThisWorkbook.Saved = True
ThisWorkbook.Close


End If
End If


End Sub


Private Sub lbldone_click()


End Sub


Private Sub Label1_Click()


End Sub


Private Sub cmdcancel_Click()
Unload frmAuthorisation
End Sub


Private Sub TxtPW_Change()


End Sub


Private Sub UserForm_Click()


End Sub- Hide quoted text -


- Show quoted text -


I am also interested in showing XXXX instead of the actual password.
It's great that I learned with your help that I can do this with
editing the textbox's properties, but how do you or could you apply
this to a standard msgbox?

Thanks!


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 32
Default Userform password to show "xxxxxx" in the text box

On 15 Mar, 11:40, Toppers wrote:
One of the Properties of a text box is "Password Character: set this to (for
example) "*" (no quotes needed)

HTH



"Ola2B" wrote:
Can someone please help me here. When entering password or authourised
code in the text box, I would like it to show xxxxxx and not display
the password. Please see below the vb code i am working on.


Many thanks for any help.


Ola.


Option Explicit
Dim sPrompt As String
Dim vPW As Variant
Public cntr As Integer


Private Sub Cmdok_Click()
If TxtPW.Value = "55555" Then
frmAuthorisation.Hide
Call CreateTemplate
Me.lbldone.Caption = "A total of " & iWCount & " workbooks" _
& " containing a total of " & iCCount & " worksheets created."
Me.lbldone.Visible = True
frmAuthorisation.Show


Else
cntr = cntr + 1
If cntr = 2 Then


MsgBox "SORRY..YOU HAVE ENTERED AN INCORRECT
PASSWORD...GOODBYE!!!"
ThisWorkbook.Saved = True
ThisWorkbook.Close


End If
End If


End Sub


Private Sub lbldone_click()


End Sub


Private Sub Label1_Click()


End Sub


Private Sub cmdcancel_Click()
Unload frmAuthorisation
End Sub


Private Sub TxtPW_Change()


End Sub


Private Sub UserForm_Click()


End Sub- Hide quoted text -


- Show quoted text -


Thanks, but where do you insert the password character, "x" in the vb.

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Userform password to show "xxxxxx" in the text box

Open the VBE
Show your userform
Rightclick on the textbox, choose properties
Change the .passwordchar property

Ola2B wrote:

On 15 Mar, 11:40, Toppers wrote:
One of the Properties of a text box is "Password Character: set this to (for
example) "*" (no quotes needed)

HTH



"Ola2B" wrote:
Can someone please help me here. When entering password or authourised
code in the text box, I would like it to show xxxxxx and not display
the password. Please see below the vb code i am working on.


Many thanks for any help.


Ola.


Option Explicit
Dim sPrompt As String
Dim vPW As Variant
Public cntr As Integer


Private Sub Cmdok_Click()
If TxtPW.Value = "55555" Then
frmAuthorisation.Hide
Call CreateTemplate
Me.lbldone.Caption = "A total of " & iWCount & " workbooks" _
& " containing a total of " & iCCount & " worksheets created."
Me.lbldone.Visible = True
frmAuthorisation.Show


Else
cntr = cntr + 1
If cntr = 2 Then


MsgBox "SORRY..YOU HAVE ENTERED AN INCORRECT
PASSWORD...GOODBYE!!!"
ThisWorkbook.Saved = True
ThisWorkbook.Close


End If
End If


End Sub


Private Sub lbldone_click()


End Sub


Private Sub Label1_Click()


End Sub


Private Sub cmdcancel_Click()
Unload frmAuthorisation
End Sub


Private Sub TxtPW_Change()


End Sub


Private Sub UserForm_Click()


End Sub- Hide quoted text -


- Show quoted text -


Thanks, but where do you insert the password character, "x" in the vb.


--

Dave Peterson
  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 32
Default Userform password to show "xxxxxx" in the text box

On 15 Mar, 14:36, Dave Peterson wrote:
Open the VBE
Show your userform
Rightclick on the textbox, choose properties
Change the .passwordchar property





Ola2B wrote:

On 15 Mar, 11:40, Toppers wrote:
One of the Properties of a text box is "Password Character: set this to (for
example) "*" (no quotes needed)


HTH


"Ola2B" wrote:
Can someone please help me here. When entering password or authourised
code in the text box, I would like it to show xxxxxx and not display
the password. Please see below the vb code i am working on.


Many thanks for any help.


Ola.


Option Explicit
Dim sPrompt As String
Dim vPW As Variant
Public cntr As Integer


Private Sub Cmdok_Click()
If TxtPW.Value = "55555" Then
frmAuthorisation.Hide
Call CreateTemplate
Me.lbldone.Caption = "A total of " & iWCount & " workbooks" _
& " containing a total of " & iCCount & " worksheets created."
Me.lbldone.Visible = True
frmAuthorisation.Show


Else
cntr = cntr + 1
If cntr = 2 Then


MsgBox "SORRY..YOU HAVE ENTERED AN INCORRECT
PASSWORD...GOODBYE!!!"
ThisWorkbook.Saved = True
ThisWorkbook.Close


End If
End If


End Sub


Private Sub lbldone_click()


End Sub


Private Sub Label1_Click()


End Sub


Private Sub cmdcancel_Click()
Unload frmAuthorisation
End Sub


Private Sub TxtPW_Change()


End Sub


Private Sub UserForm_Click()


End Sub- Hide quoted text -


- Show quoted text -


Thanks, but where do you insert the password character, "x" in the vb.


--

Dave Peterson- Hide quoted text -

- Show quoted text -



Thank you very much Dave, it actually did worked!!!!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Text "comparison" operator for "contains" used in an "IF" Function Pawaso Excel Worksheet Functions 4 April 4th 23 11:35 AM
EXCEL allow 2 options on status bar e.g. show "Count" + "Sum" LEJM Excel Discussion (Misc queries) 2 November 15th 07 07:49 PM
if "a" selected from dropdown menu then show "K" in other cell LEGALMATTERS Excel Worksheet Functions 1 April 13th 06 06:05 PM
conditional formula to show "open" or "closed" SBS Excel Worksheet Functions 6 January 28th 06 01:48 AM
Insert "-" in text "1234567890" to have a output like this"123-456-7890" Alwyn Excel Discussion (Misc queries) 3 October 25th 05 11:36 PM


All times are GMT +1. The time now is 07:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"