Page 1 of 1

If In If

Posted: Mon Mar 01, 2010 12:11 pm
by Smiley
Hi Need Some Help For A Game Im Making I Need To Make An If Inside An If Thanks In Advanced.

Example:
If Textbox1.text = "y" then
if me.colour = "blue" then
textbox1.text = "b"
end if
end if

Re: If In If

Posted: Mon Mar 01, 2010 12:22 pm
by CodenStuff
Hello,

The code example you gave should work. It would be better if you used "AndAlso" like this:
Code: Select all
If Textbox1.text = "y" AndAlso me.colour = "blue" then 
textbox1.text = "b"
End If
Hope that helps cooll;