VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



A simple way to validate data entered by a user

by sumeet haldankar (5 Submissions)
Category: String Manipulation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 21st August 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

A simple way to validate data entered by a user

API Declarations


Dim arr(5, 0) As String
Dim i As Integer

Rate A simple way to validate data entered by a user



    Dim arr(5, 0) As String
    Dim i As Integer
    arr(0, 0) = "@"
    arr(1, 0) = "#"
    arr(2, 0) = "$"
    arr(3, 0) = "%"
    arr(4, 0) = "^"
    arr(5, 0) = "&"
    
        For a = 0 To 5
            i = InStr(1, Text1, arr(a, 0))
            If i <> 0 Then
            MsgBox "No Invalid Characters"
            Exit Sub
            End If
        Next a

Download this snippet    Add to My Saved Code

A simple way to validate data entered by a user Comments

No comments have been posted about A simple way to validate data entered by a user. Why not be the first to post a comment about A simple way to validate data entered by a user.

Post your comment

Subject:
Message:
0/1000 characters