This is the basic Code for Nested IF Structure in vb6
Adrian = Val(Text1.Text)'holds the value of text1
Panoy = Val(Text2.Text)'holds the value of text2
If Adrian = 100 Then ' if Adrian=100 then it will to the next if
If Panoy = 100 Then 'if Panoy=100 then msgbox Prompt
MsgBox "You Got it"
End If
End If
End Sub
Happy Coding
Dim Adrian, Panoy As Integer
Adrian = Val(Text1.Text)'holds the value of text1
Panoy = Val(Text2.Text)'holds the value of text2
If Adrian = 100 Then ' if Adrian=100 then it will to the next if
If Panoy = 100 Then 'if Panoy=100 then msgbox Prompt
MsgBox "You Got it"
End If
End If
End Sub
Happy Coding
Leave a comment