Input box method - value for input of date 
Author Message
 Input box method - value for input of date

Hi

I would like to know if there is a variable that can be
used for checking that a user has entered a date when the
input box method is used.

If not is there a way to check that the user has input a
date.

Thanks
Tony S



Thu, 13 Jan 2005 15:44:58 GMT  
 Input box method - value for input of date
dim ans as string
dim dtVal as Date
ans = InputBox("Enter Data")
if isDate(ans) then
  dtval = cDate(ans)
else
  exit sub
End if

Application.InputBox offers more options, but doesn't have an option to
check for a date specifically.

Regards,
Tom Ogilvy


Quote:
> Hi

> I would like to know if there is a variable that can be
> used for checking that a user has entered a date when the
> input box method is used.

> If not is there a way to check that the user has input a
> date.

> Thanks
> Tony S



Thu, 13 Jan 2005 17:36:35 GMT  
 Input box method - value for input of date
See if this helps.

Note: I'm using Excel 2002 and have no idea if this trick
is available on other versions but I gave it a quick try
before replying and I know it works on mine.

Select the cell/range you want to check. On the Data
menu, select Validation, then the Settings tab. From the
Allow list select Date, and from the Data list any other
necessary criteria. From the Input Message and Error
Alert tabs you can inform the user prior to a mistake
(Input) or after a mistake (Error).

Good luck.

Robin

Quote:
>-----Original Message-----
>Hi

>I would like to know if there is a variable that can be
>used for checking that a user has entered a date when
the
>input box method is used.

>If not is there a way to check that the user has input a
>date.

>Thanks
>Tony S
>.



Fri, 14 Jan 2005 01:35:04 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How combine several inputs within same input box?

2. Does input box value = cell value?

3. Input Box receives input from user cell selection?

4. How to control user input into cells rather than using input dialog boxes

5. application.input box, 0 for input same as false for cancel

6. Input without input box

7. Hiding Input Text in Input Box

8. Input box, pause code for user input

9. Dynamicaly defining different input ranges in combo box (input forms)

10. VBA column number input from input box cell selection


 
Powered by phpBB® Forum Software © phpBB Group