I was declaring the variables I thought.
Ok, scrap that jacked up code and check this one out.
myString = txtEnteredUserN ame
stringLength = myString.Length
If stringLength Then > 10 Then 'Username Accepted
If Else 'User Name Error
Errors
mystring and stringLength say not declared
Else says expression expected
...
User Profile
Collapse
-
QueenSheebaEarth replied to I can't figure out how to code a string.Length and post a message that correspondsin Visual BasicI thought the Dim statements declared my variables. On my form I have 4 things. 1 text box named txtEnteredUserN ame, 2 Labels one to prompt the user to enter their name and the other is named LblOutput. And 1 submit button, That is suppose to calculate the nunber of letters entered by the user into the text box. If the name entered is equal to or less than 10 letters than a message box should say "user name accepted" if the name is more...Leave a comment:
-
QueenSheebaEarth started a topic I can't figure out how to code a string.Length and post a message that correspondsin Visual BasicI can't figure out how to code a string.Length and post a message that corresponds
The program is suppose to count the letters input by the user into the text box and if they are<10 a messagebox is suppose to pop up and say " username accepted" if >10 "username error"
This is what I have to work with and I don't know what to do with it. I'm using VB express
This is the example I received:
...Code:Dim stringLength As Integer Dim myString As String
No activity results to display
Show More
Leave a comment: