#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 126
Default Textbox Return

I have a userform with a textbox that calls for a password to be entered.
When the userform loads, I would like to cursor to appear in the textbox. I
would also let the enter key to accept what's entered in the text box instead
of move to the next object on the form. Here's the code I have so far:

If Me.TextBox1.Text = ThisWorkbook.Worksheets("Sheet3").Range("B90").Val ue
Then
Unload Me
Else
MsgBox "Incorrect Password. Try Again"
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 772
Default Textbox Return

On the properties section for the textbox make sure that tab stop is true and
set the TabIndex to 0. On the buttons properties set Default to True.
--
-John Northwest11
Please rate when your question is answered to help us and others know what
is helpful.


"Johnny" wrote:

I have a userform with a textbox that calls for a password to be entered.
When the userform loads, I would like to cursor to appear in the textbox. I
would also let the enter key to accept what's entered in the text box instead
of move to the next object on the form. Here's the code I have so far:

If Me.TextBox1.Text = ThisWorkbook.Worksheets("Sheet3").Range("B90").Val ue
Then
Unload Me
Else
MsgBox "Incorrect Password. Try Again"

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
Vlookup to Return a Range of Data James Excel Discussion (Misc queries) 0 July 13th 06 09:44 PM
help with index to return particular cell value Allan from Melbourne Excel Discussion (Misc queries) 0 May 27th 06 03:20 AM
annualized return calculation for the purpose of portfolio performance evaluation sharkey Excel Worksheet Functions 2 April 8th 06 09:41 PM
check if reference exists, then return its value or return 0 doudou Excel Worksheet Functions 1 June 4th 05 09:17 PM
How do create a formula to evalute a # to return 1 of 4 conditions Larry Excel Worksheet Functions 4 May 29th 05 12:58 AM


All times are GMT +1. The time now is 11:58 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"