Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a simple form with 3 text boxes(txtBadge,txtCount,txtRet) and 1
button. I want to enter data in txtbadge, do some checking, update a counter txtCount and return the focus to txtbadge so that the next value can be entered. The problem is that when the AfterUpdate sub ends, the focus goes to txtRet textbox - I want it t stay in txtBadge. The code below works OK until the End Sub is executed. Any ideas would be welcome...... Private Sub bnExit_Click() Unload fmReturnUsed End Sub Private Sub txtBadge_AfterUpdate() txtRet.Value = "RETURNED" txtCount.Value = Val(txtCount.Value) + 1 txtBadge.SelStart = 0 txtBadge.SelLength = Len(txtBadge.Value) txtBadge.SetFocus End Sub Regards Martin |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
SOme problem on VBA Userform | Excel Programming | |||
SetFocus to first textbox on userform upon Userform1.Show | Excel Programming | |||
SetFocus Problem | Excel Programming | |||
TextBox SetFocus Problem | Excel Programming | |||
SetFocus problem | Excel Programming |