J
jamesp
I'm using after update to check to see if a date function is correct. If I
click away inside another txtbox (say txtB) and the test on the previous
txtbox (txtA) failed the txtA.setfocus doesn't work (if you step through it
sets the focus back to txtA but then goes to txtB when the macro finishes)
Private Sub txtA_AfterUpdate()
'test to see if correct date
If checkDate(txtA.value) = false Then
Msgbox "Wrong date"
txtA.SetFocus
End If
End Sub
Any ideas?
Many thanks
James
click away inside another txtbox (say txtB) and the test on the previous
txtbox (txtA) failed the txtA.setfocus doesn't work (if you step through it
sets the focus back to txtA but then goes to txtB when the macro finishes)
Private Sub txtA_AfterUpdate()
'test to see if correct date
If checkDate(txtA.value) = false Then
Msgbox "Wrong date"
txtA.SetFocus
End If
End Sub
Any ideas?
Many thanks
James