ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Editing date in textbox? (https://www.excelbanter.com/excel-programming/277665-editing-date-textbox.html)

Don Wiss

Editing date in textbox?
 
When a date is required in a spreadsheet cell it is real easy to use Data
Validation. But if input is being entered in a Form, one only has a
textbox. (I am not interested in any date input control, as nothing is
easier to input than simply typing a date.) I don't see any easy way to
edit that the date is valid. I am planning to try assigning the input to a
date data type and capturing any errors. Is there any other way?

Thanks, Don <donwiss at panix.com.

zantor[_15_]

Editing date in textbox?
 
Hi Don,

You will have to use the 'IsDate' funcion:

If IsDate(TextBox1) = False Then
MsgBox "Not a valid date."
Else
MsgBox "Valid date"
End If



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/


Don Wiss

Editing date in textbox?
 
On Mon, 22 Sep 2003, zantor wrote:

You will have to use the 'IsDate' funcion:

If IsDate(TextBox1) = False Then
MsgBox "Not a valid date."
Else
MsgBox "Valid date"
End If


Thank you. I was not aware of Isdate. I will try this tomorrow at work, and
hope that it exists in Excel 97.

Don <donwiss at panix.com.


All times are GMT +1. The time now is 12:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com