CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2000
    Location
    Tallahassee, FL
    Posts
    121

    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


  2. #2
    Guest

    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




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured