Can i do an else if statement

masterigor
12-12-2004, 09:51 AM
can i do a statement like =

If Label2.Caption = "+" And Label4.Caption = "" Then
Label4.Caption = Int(Label1.Caption) + Int(Label3.Caption)
Else

and can i do the else with like else if label2.caption ="+" how can i do that>?

MikeJ
12-12-2004, 09:53 AM
Via ElseIf. You can have an unlimited amount of ElseIf's, but it's recommended that you don't use too many so that way the code doesn't become unreadable.

If Condition1 = Value1 And Condition2 = Value2 Then
'Do Something
ElseIf Condition1 = Value1 Then
'Do something else
ElseIf Condition3 = Value3 Then
'Do this
End If

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum