If In If

Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
2 posts Page 1 of 1
Contributors
User avatar
Smiley
VIP - Donator
VIP - Donator
Posts: 269
Joined: Sat Dec 19, 2009 3:39 pm

If In If
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
User avatar
CodenStuff
Site Admin
Site Admin
Posts: 4392
Joined: Tue Aug 04, 2009 1:47 am

Re: If In If
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;
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
2 posts Page 1 of 1
Return to “Tutorial Requests”