Unconditional branching is just calling a subroutine or function on the subsequent line.
There are several different ways you can implement conditional branching.
If - Then - Else
If (iValue > 10) Then
Call MsgBox("number is greater than 10")
Call MsgBox("number is less than or equal to 10")
Select - Case
Select Case sText
Case "Match 1": Call Proc1()
Case "Match 2": Call Proc2()
Case Else: Call Proc3()
Dim iNumber As Integer
iNumber = 50
Call Msgbox( IIf( iNumber > 40, "over forty", "less than forty") )
© 2020 Better Solutions Limited. All Rights Reserved. © 2020 Better Solutions Limited TopPrevNext