LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Take action after entry in a textbox (or after tabbing out of/into it)


Hi all,

I have a userform with some text boxes, and I want one of them to be
grayed out depending on the entry in the one before it. If the user
types "FL" in the first box, I want the second to be disabled. The
trouble is that I want it to check this after the entry in the first
box is made and while the userform is still up.

How do I make it happen after the entry is made? It would also work if
I could make it happen upon tabbing out of the box or into another.
Here's the code I'm trying:


Private Sub txtFee_Change()
'grays out the fee box if txtState = FL
If txtState = "FL" Then
txtFee.Enabled = False
Else: txtFee.Enabled = True
End If
End Sub


This code is fine and works for graying out, but only if the txtState =
"FL" at initialization. I want it to work right when FL is entered.

Thanks for your help!


--
Lost!
------------------------------------------------------------------------
Lost!'s Profile: http://www.excelforum.com/member.php...o&userid=23990
View this thread: http://www.excelforum.com/showthread...hreadid=385312

 
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
Action Event, CheckBox, Add Row and Textbox Ryan Excel Discussion (Misc queries) 2 July 17th 07 02:32 PM
Auto entry clock into a cell on tabbing into it John Excel Worksheet Functions 3 May 7th 07 10:23 AM
textbox tabbing????? Hoyos Excel Discussion (Misc queries) 3 November 29th 06 11:02 AM
Validate textbox entry Stuart[_21_] Excel Programming 2 May 13th 05 07:31 PM
TextBox Controls--tabbing Ed Prill Excel Programming 1 August 17th 04 02:56 PM


All times are GMT +1. The time now is 11:34 AM.

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"