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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

arrays and check it against the list

Status
Not open for further replies.

Oracledba45

IS-IT--Management
Oct 4, 2015
1
US
Iam a bit new in VB and would like to write a program that allows the user to input their username then check username against stored usernames with store acceptable usernames.

also i want to allow the user name to be changed and add/amend it to a new stored username 'list' . i have wrote the code but i got lost a bit

Sub Main()
Dim usernames(4) As String
usernames(0) = "claire"
usernames(1) = "matt"
usernames(2) = "falicity"
usernames(3) = "dean"
usernames(4) = "june"
DIm inputString
inputString= InputBox("Enter the user name", "Enter Name", "", 500, 500)

if inputString




End Sub
 
You would need to store the list somewhere. Either in a text file which you could then retrieve into a dictionary object for verification or you could stoe in a database and retrieve a recorsdset which you could then match against. This would also allow for additions, removals or changes to the list of user names.

Swi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top