Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
vb validation
Name: jimmy Date: January 9, 2002 at 15:30:53 Pacific
Comment:
i need to validate some input from a text box. The input should only be real numbers, characters should be avoided. also the validation should make sure the user can only input 1 decimal point. i have been given many suggestions, but am having a lot of trouble doing it. if some has vb code please could you write the code when you reply to this.
Name: Fred Date: January 9, 2002 at 20:34:59 Pacific
Reply:
'I have two words for you! '1)The first is: IsNumeric(X), it returns true if X is a number.
'2)And the second is: Format(X,"###0.000"), it formats the value of X.
'NOTE) Create a form with 1ea. textbox named Text1 and 1ea. label named Label1. Then paste the following code and run it. Hope this helps you out. Private Sub Form_Load() Label1.Width = 3500 Label1.Caption = "Please enter a number Then CLICK HERE!" Text1.Width = 2000 End Sub
Private Sub Label1_Click() Dim X X = Format(Text1.Text, "###0.0") If IsNumeric(Text1.Text) Then Label1.Caption = "Your value >" & X & " < has been rounded!" Else Label1.Caption = "Numeric values only! Then CLICK HERE" End If End Sub
0
Response Number 2
Name: jimmy Date: January 10, 2002 at 03:20:11 Pacific
Reply:
thankyou
0
Response Number 3
Name: sentha Date: February 27, 2002 at 17:46:32 Pacific
Reply:
I want Date and Time Validation with
mm/dd/yy hh:mi am
format
thanks
0
Response Number 4
Name: Prithvi Date: March 19, 2002 at 08:27:47 Pacific
Reply:
Hello, I want only date to be validated which is in MaskEdBox Format: dd/mm/yyyy
Thanks Prithvi
0
Response Number 5
Name: abha soni Date: May 22, 2002 at 06:39:33 Pacific
Reply:
i need how to apply date validations in vb and what are the conditions for which we can apply the validations.
Summary: I have made a vb program in Eng. Windows NT. The program read 2 excel files and compare them than create a excel file to store the result. It works very well in Eng. Windows but i get an error when ru...
Summary: "Everyone is missing the most important issues here which are not 'programming virtues' " Well, it's possible to contribute to a discussion without trying to initially rubbish other people's opinions....
Summary: Is the solution 96421 * 8753 = 843973013? I think it is, although I didn't write code to test each combination. Yes, you could do this in 30 lines in c++ or VB, but it would not be recommended. Unle...