Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have a text box in a user form for user to enter a password. A command button is on the user form for the user to click "OK" when they have entered the password.If the incorrect password is entered my macro loops around for the user to try again. However I cannot get my text box to clear, so if multiple password attempts are required, a very long text string is created thus making it impossible to enter the correct password. Grateful for help on ways around this. Thanks Graham |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Graham,
You don't need to clear it, just select everything so that the next typing overwrites With TextBox1 If .Text < "myPassword" Then MsgBox "Invalis password" .SelStart = 0 .SelLength = Len(.Text) .SetFocus End If End With -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Graham" wrote in message ... Hi, I have a text box in a user form for user to enter a password. A command button is on the user form for the user to click "OK" when they have entered the password.If the incorrect password is entered my macro loops around for the user to try again. However I cannot get my text box to clear, so if multiple password attempts are required, a very long text string is created thus making it impossible to enter the correct password. Grateful for help on ways around this. Thanks Graham |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Display contents of a cell in a user form text box -- Excel 2003 VBA | Excel Discussion (Misc queries) | |||
Clear a Checkbox in a a user form | Excel Discussion (Misc queries) | |||
Adding a new text box to user form | Excel Discussion (Misc queries) | |||
User Form: Cannot Update Text Box | Excel Discussion (Misc queries) | |||
Submit User Form Contents to next available row | Excel Programming |