"Ixtreme" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have a form on which a date can be entered in textbox1. After
> clicking OK and submitting the form, the data is copied automatically
> to a sheet.
>
> The problem is that if a user wants to enter a date like 1 february
> 2007, the date in my sheet displays this date as if the user entered
> 2nd of january. What I would like to have is:
>
> 1. Preformat the textbox1 like DD/MM/YYYY. (If the form opens,
> textbox1 should display DD/MM/YYYY. Upon selecting the cell, the user
> can overwrite this with in this case: 01/02/2007
When loading the textbox, use
TextBox1.Text = Format(Range("A1").Value, "dd/mm/yyyy")
> 2. Display a label on the form displaying the long date of the date
> the user has entered.
> 3. Display the correct date on my sheet as an integer (I use this
> value to sort my list on)
Range("B2").Value = CLng(TextBox1.Text)
|