Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Validation within userforms 1

Status
Not open for further replies.
Jan 28, 2003
149
GB
Can someone recommend a best practice for validating the entries a user makes on a user form. The form I'm creating will contain dates and values.

Is there a function similar to the worksheet function IsNumber()

Thanks in advance

B.M.
 

Hi,

Have you looked at VB HELP for the Is... Functions?

Skip,
[sub]
[glasses] [red]Be Advised![/red] A Last Will and Testament is...
A Dead Giveaway! [tongue][/sub]
 
From what I can make out the IsX doesn't work within VB

B.M.
 


VB Help said:
IsNumeric Function


Returns a Boolean value indicating whether an expression can be evaluated as a number.

Syntax

IsNumeric(expression)

The required expression argument is a Variant containing a numeric expression or string expression.

Remarks

IsNumeric returns True if the entire expression is recognized as a number; otherwise, it returns False.

IsNumeric returns False if expression is a date expression.

Skip,
[sub]
[glasses] [red]Be Advised![/red] A Last Will and Testament is...
A Dead Giveaway! [tongue][/sub]
 
Thanks for that Skip,

I double checked the VB help and found some references, however the hlp file required hasn't been installed on my system (and there's no chance of it being installed soon).

Do you know of a way of checking for a valid date?

Thanks very much



B.M.
 
Strewth - thanks a bunch Skip - I promise you I tried that before posting.

Thanks again

BM

B.M.
 
Thanks for your answers everyone. I now have the system working.

B.M.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top