if (statement)
Page 1 of 15 Replies - 631 Views - Last Post: 07 January 2011 - 02:41 PM
#1
if (statement)
Posted 06 January 2011 - 02:14 AM
need help from statement using if, and,else please help to understand well.
Replies To: if (statement)
#2
Re: if (statement)
Posted 06 January 2011 - 03:31 AM
An IF statement is used when you have a condition to meet. Say if you're developing a grade system maybe you'd use something like this:
You could also check out this link MSDN VB Help
Dim studentMark As Integer
Dim studentGrade As String
studentMark = textbox1.text
If number < 50 Then
studentGrade = "Fail"
Else
studentGrade = "Pass"
End If
You could also check out this link MSDN VB Help
#3
Re: if (statement)
Posted 06 January 2011 - 04:50 AM
It appears from the one of the other topics opened by this person (which was banished to the "Give Me The Codez" section), they're ACTUALLY using Visual Basic .NET, so I'll move this there. OP, VB6 is VERY DIFFERENT from VB.NET.
If you're having trouble with if/else...you've got a LONG road ahead.
If you're having trouble with if/else...you've got a LONG road ahead.
#4
Re: if (statement)
Posted 06 January 2011 - 05:54 AM
#5
Re: if (statement)
Posted 07 January 2011 - 03:31 AM
If statement, is to see if a condition is true or false.
If the door is not open, it's closed...
If the door is not open, it's closed...
#6 Guest_Tess F*
Re: if (statement)
Posted 07 January 2011 - 02:41 PM
jnstech, on 06 January 2011 - 01:14 AM, said:
need help from statement using if, and,else please help to understand well. 
If / else statements are conditions statements.
Always have the following sytax if -> then -> elseif -> then ->else->endif
your can have as many statements as you want
for example
if grade>=85 ANd grade<=100 then
lbl.text="A"
Elseif Grade >=70 and grade<=84 then
lbl.text="B"
Else
lbl.text="C"
End if
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote






|