Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub Demo()
- Dim result As String
- result = EvenOrOdd(2)
- Debug.Print result
- End Sub
- Function EvenOrOdd(num As Integer)
- If num Mod 2 = 0 Then
- EvenOrOdd = "even"
- 'MsgBox "even"
- Else
- EvenOrOdd = "odd"
- 'MsgBox "odd"
- End If
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement