Mega Code Archive

 
Categories / VisualBasic Script / Language Basics
 

A simple decision-making structure in a subroutine

=     Is equal to <>     Is not equal to >     Is greater than <     Is less than >=     Is greater than or equal to <=     Is less than or equal to Sub ifTest()     Dim intNum As Integer     Dim strMessage As String     intNum = 12     If intNum > 10 Then         strMessage = "The number is " & intNum     End If     Debug.Print strMessage End Sub