LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
check spelling as you type dp New Users to Excel 5 February 3rd 10 07:00 PM
Check for error.type in same cell art Excel Worksheet Functions 2 May 13th 09 06:14 AM
UserForm value check Dan Excel Programming 1 November 1st 04 05:21 PM
How to check a Variant for its data type TBA[_2_] Excel Programming 5 January 9th 04 11:04 PM
Type of textbox on userform Lieven Mettepenningen[_2_] Excel Programming 2 October 15th 03 01:36 PM


All times are GMT +1. The time now is 04:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"