if statement
-
how can i use the 'or' function. I want that if the user didn't enter a specific username ex: liba or demel or pufta! how can i do this?? i am using this but it aint working: If text = "pufta" Or "demel" Then MessageBox.Show("You have registered for the program. Now close the registration menu and start using the program. Have Fun!!", _ "Registration Completed", MessageBoxButtons.OK, MessageBoxIcon.Information) s.WriteLine(txtbox.Text) s.Close() End If Adrian
-
how can i use the 'or' function. I want that if the user didn't enter a specific username ex: liba or demel or pufta! how can i do this?? i am using this but it aint working: If text = "pufta" Or "demel" Then MessageBox.Show("You have registered for the program. Now close the registration menu and start using the program. Have Fun!!", _ "Registration Completed", MessageBoxButtons.OK, MessageBoxIcon.Information) s.WriteLine(txtbox.Text) s.Close() End If Adrian
Or doesn't work like that. Below is how or works. if text = "pufta" or text = "demel" then 'do stuff end if if case doesn't matter (D and d are the same), I would use the following: if string.compare(text, "pufta", true) = 0 _ or string.compare(text, "demel", true) = 0 then 'do stuff end if
-
how can i use the 'or' function. I want that if the user didn't enter a specific username ex: liba or demel or pufta! how can i do this?? i am using this but it aint working: If text = "pufta" Or "demel" Then MessageBox.Show("You have registered for the program. Now close the registration menu and start using the program. Have Fun!!", _ "Registration Completed", MessageBoxButtons.OK, MessageBoxIcon.Information) s.WriteLine(txtbox.Text) s.Close() End If Adrian
If **textbox1.**text = "pufta" Or "demel" Then MessageBox.Show("You have registered for the program. Now close the registration menu and start using the program. Have Fun!!", _ "Registration Completed", MessageBoxButtons.OK, MessageBoxIcon.Information) s.WriteLine(txtbox.Text) s.Close() End If I think you were missing the bold part....
-
If **textbox1.**text = "pufta" Or "demel" Then MessageBox.Show("You have registered for the program. Now close the registration menu and start using the program. Have Fun!!", _ "Registration Completed", MessageBoxButtons.OK, MessageBoxIcon.Information) s.WriteLine(txtbox.Text) s.Close() End If I think you were missing the bold part....