Results 1 to 5 of 5

Thread: Restrict User To Enter Permissible Date Range Values Only In TextBox

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Member
    Join Date
    Jul 2013
    Posts
    40
    Rep Power
    0

    Restrict User To Enter Permissible Date Range Values Only In TextBox

    Hi, I have a form that has a specific textbox named DateBox and I want to restrict the user from entering any date later than 25 November 2013.
    Any quick ideas on how to do this?

    I have searched quickly but did not manage to find something suitable.
    Thanks in advance for any reply.

    I have tried something like this but it is not working...

    Code:
    Private Sub Datebox_Change()
    Dim maxdate As String
    maxdate = "25/11/2013"
    If Datebox.Value > maxdate Then
    MsgBox "You have entered an invalid date"
    Else
    Exit Sub
    End If
    End Sub
    Last edited by MrBlackd; 11-15-2013 at 02:33 PM.

Similar Threads

  1. Replies: 10
    Last Post: 10-17-2013, 07:36 PM
  2. Combobox with Dynamic Date Range
    By paul_pearson in forum Excel Help
    Replies: 5
    Last Post: 07-21-2013, 06:14 PM
  3. Replies: 5
    Last Post: 06-15-2013, 12:40 PM
  4. Replies: 3
    Last Post: 05-17-2013, 01:22 PM
  5. Replies: 2
    Last Post: 03-31-2012, 10:46 PM

Posting Permissions

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