mask edit control selection text
If the user enters an invalid date for the date mask edit control (mskDate) I'm telling the user they have an invalid date... then i (want) to select the entire text they put in ... but it's not working.... how is this supposed to be done..
here is what i have
If Not IsDate( mskDate.Text )
msgbox "NO... etc"
mskDate.SetFocus
mskDate.SelStart = 0
mskDate.SelLength = Len( mskDate.Text )
End If
it's not working though... any clues?
thankx
Re: mask edit control selection text
Your Code works for me with the exception that you have missed the then at the start of the if block
ie.
If Not IsDate( mskDate.Text) THEN