Mega Code Archive

 
Categories / VisualBasic Script / Language Basics
 

One-Line If Statements

Sub ifDemo()     Dim bytAge As Byte     bytAge = InputBox("Enter your age.", "Age")     If bytAge < 21 Then MsgBox "You may not purchase alcohol.", , "Underage" End Sub