Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
userform-check data type
I am developing a userform in which the user will enter a date. I want the
code to verify that the data entered is a valid date (type dbDate) before calling the procedure. To do this I have been working with the code below: Private Sub TextBox1_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean) Dim dtHol As Variant dtHol = TextBox1.Value If TextBox1.Type < dbDate And TextBox1.Value < "" Or _ TextBox1.Value < 0 Then Call errMsg1 End If End Sub The Type method does not seem to be available for this purpose, and assigning a variable the value of the TextBox has been similarly unsuccessful. Any hints how this should be done? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
check spelling as you type | New Users to Excel | |||
Check for error.type in same cell | Excel Worksheet Functions | |||
UserForm value check | Excel Programming | |||
How to check a Variant for its data type | Excel Programming | |||
Type of textbox on userform | Excel Programming |