G
Guest
I am new to VBA and not familiar with the syntax. Can someone help me with
the following task?
I have user provide me a date using inputbox(), and I want to verify if the
input date meets the following requirements. If yes, accept the input. If
not, reject the input and loop back to ask for input again.
** Requirements:
1) The input date has to be in mm/dd/yyyy or m/d/yyyy (1/1/2006 for example)
format. If user enters single digit for month and day such as 1/1/2006, the
script will
accept the input and reformat it to mm/dd/yyyy (01/01/20006 for example).
2) The delimiter has to be "/". All other delimiters will be rejected.
3) Reject input if condition 1) and 2) above are not met. Loop back to ask
for user input again.
Any help is greatly appreciated. Thanks!
YH
the following task?
I have user provide me a date using inputbox(), and I want to verify if the
input date meets the following requirements. If yes, accept the input. If
not, reject the input and loop back to ask for input again.
** Requirements:
1) The input date has to be in mm/dd/yyyy or m/d/yyyy (1/1/2006 for example)
format. If user enters single digit for month and day such as 1/1/2006, the
script will
accept the input and reformat it to mm/dd/yyyy (01/01/20006 for example).
2) The delimiter has to be "/". All other delimiters will be rejected.
3) Reject input if condition 1) and 2) above are not met. Loop back to ask
for user input again.
Any help is greatly appreciated. Thanks!
YH