chungtinhlak
12-07-2008, 11:13 AM
Hi Hello All,
I have an inputbox to allow user to input the date, then it will go into a excel for some calucation.
I set it up like this
UserForm1.datestart.Text = Format(Date, "dd-mm-yyyy")
UserForm1.dateend.Text = Format(Date, "dd-mm-yyyy")
But when the user input for example, 11/1/08
it will come into excel as an error, excel gets confuse with the year, 1908 and 2008.
Is there a way that I can force the user to input a 4-digit year instead?
Also, The User have to input a start and end date, when I set it up in this format, there is a default date on there and it changes everyday. For example right now, on both boxes, the date is 7/12/2008, but yesterday, they said 6/12/2008.
I want to make sure that the user inputs the date range before the run the command button for the calucation. Is there a way to generation a message box if they dont' enter in a new date?
thanks
I have an inputbox to allow user to input the date, then it will go into a excel for some calucation.
I set it up like this
UserForm1.datestart.Text = Format(Date, "dd-mm-yyyy")
UserForm1.dateend.Text = Format(Date, "dd-mm-yyyy")
But when the user input for example, 11/1/08
it will come into excel as an error, excel gets confuse with the year, 1908 and 2008.
Is there a way that I can force the user to input a 4-digit year instead?
Also, The User have to input a start and end date, when I set it up in this format, there is a default date on there and it changes everyday. For example right now, on both boxes, the date is 7/12/2008, but yesterday, they said 6/12/2008.
I want to make sure that the user inputs the date range before the run the command button for the calucation. Is there a way to generation a message box if they dont' enter in a new date?
thanks