Mega Code Archive

 
Categories / VisualBasic Script / Data Type
 

Pass Boolean type variable to a function

Function MakeIceCream(VanillaToBeAdded As Boolean) As String     If VanillaToBeAdded Then         MakeIceCream = "Vanilla"     Else         MakeIceCream = "No Vanilla"     End If End Function Sub Hungry()     Debug.Print MakeIceCream(True) End Sub