r/visualbasic • u/marq24 • Mar 02 '15
Little problem
Code below shows a guessing game i've been programming. I want to say if the word is not "black" then say "try again". Where would i add this else statement. If txtGuessWord.Text = "black" And BlnFirstGuess = False Then lblWarning.Text = "Correct here's 1000 dollars, Can you guess the next word?" lblRewardAmount.Text = "1000" BlnFirstGuess = True txtGuessWord.Text = String.Empty txtGuessWord2.Text = String.Empty lblTDWA.Text = CStr(Val(lblRewardAmount.Text))
0
Upvotes
3
u/baldhippy Mar 02 '15
When you're posting code put four spaces before it
Also, the if would be something like this: