Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 586
Default Select or Enter into a TextBox on a UserForm

I am designing a Login Userform. If the user enters the wrong password I
want to delete the text they entered and then have the textbox selected so
they can begin typing automatically. Any suggestions would be great!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 220
Default Select or Enter into a TextBox on a UserForm

If TextBox1.Text < "password" Then
MsgBox "Invalid Password", vbCritical
TextBox1.SetFocus
TextBox1 = ""
End If

--
Dan

On Jan 3, 1:57*pm, RyanH wrote:
I am designing a Login Userform. *If the user enters the wrong password I
want to delete the text they entered and then have the textbox selected so
they can begin typing automatically. *Any suggestions would be great!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 586
Default Select or Enter into a TextBox on a UserForm

Ahhhhhh. Stupid me, I had this:

If TextBox1.Text < "password" Then
MsgBox "Invalid Password", vbCritical
TextBox1 = ""
TextBox1.SetFocus
End If

all I had to do is switch SetFocus and ""

Thanks for the help and the quick response

"Dan R." wrote:

If TextBox1.Text < "password" Then
MsgBox "Invalid Password", vbCritical
TextBox1.SetFocus
TextBox1 = ""
End If

--
Dan

On Jan 3, 1:57 pm, RyanH wrote:
I am designing a Login Userform. If the user enters the wrong password I
want to delete the text they entered and then have the textbox selected so
they can begin typing automatically. Any suggestions would be great!


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
Userform: Enter combobox value unless textbox contains data smplogc[_4_] Excel Programming 5 May 2nd 06 12:17 AM
Userform - Move to next textbox field by hitting enter instead of TimT Excel Programming 12 November 2nd 05 09:06 PM
HELP! I Lost The Ability To Advance From TextBox To TextBox With the ENTER Or The TAB Keys Minitman[_4_] Excel Programming 0 February 22nd 05 08:50 PM
UserForm TextBox to ActiveSheet TextBox over 256 characters Dan E[_2_] Excel Programming 1 July 28th 03 07:36 PM


All times are GMT +1. The time now is 05:06 AM.

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

About Us

"It's about Microsoft Excel"