snitchdnb21
Member
- Joined
- Mar 21, 2013
- Messages
- 5
- Programming Experience
- Beginner
Hi, Im pretty new to VB so excuse my inexperience with it
as this may/is be a very silly question.
Im trying to write a little program similar to a sort of encryptor which converts characters in the password string to integers of a set value etc..
I want; If "a" is in string and "b" then msgbox the stored variables a + b and so forth for how many characters are in the string (3 "a" = a x 3) etc.. hope this makes sense!
Here's my code;
Seems really simple and I can't seem to get it? They just cancel each other out?
Any help would be great.
Thanks!
Im trying to write a little program similar to a sort of encryptor which converts characters in the password string to integers of a set value etc..
I want; If "a" is in string and "b" then msgbox the stored variables a + b and so forth for how many characters are in the string (3 "a" = a x 3) etc.. hope this makes sense!
Here's my code;
VB.NET:
If textbox2.Text.Contains("a") Then
MsgBox(a)
ElseIf textbox2.Text.Contains("b") Then
MsgBox(b)
ElseIf textbox2.Text.Contains("a") AndAlso textbox2.Text.Contains("b") Then
MsgBox(a + b)
End If
Seems really simple and I can't seem to get it? They just cancel each other out?
Any help would be great.
Thanks!
Last edited: