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