Mega Code Archive

 
Categories / VisualBasic Script / Data Type Functions
 

If Then Else and IsNull

Sub cmdIfThenElse()  Dim txtName As String  Dim txtAge As String    If IsNull(txtName) Or IsNull(txtAge) Then     msgBox "Name or Age is Blank"   Else     msgBox "Your Name Is " & txtName & " And Your Age Is " & txtAge   End If End Sub