Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub LiveDemo()
- Dim num As Integer
- num = Range("A1")
- If num = 1 Then
- Debug.Print "one"
- ElseIf num = 2 Then
- Debug.Print "two"
- ElseIf num = 3 Then
- Debug.Print "three"
- ElseIf num = 4 Then
- Debug.Print "four"
- ElseIf num = 5 Then
- Debug.Print "five"
- ElseIf num = 6 Then
- Debug.Print "six"
- ElseIf num = 7 Then
- Debug.Print "seven"
- ElseIf num = 8 Then
- Debug.Print "eight"
- ElseIf num = 9 Then
- Debug.Print "nine"
- Else
- Debug.Print "not a digit"
- End If
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement