Dim x As Boolean x = IIf(Int(Rnd * 2), True, False) MsgBox x