Sub EightBall2()
Value = InputBox(prompt:="Enter a question for the 8 Ball", _
Title:="The mighty 8 Ball")
Sum = Rnd() * 100
For i = 1 To Len(Value)
Sum = Asc(Mid(Value, i, 1)) + Sum
Next i
Sum = Sum Mod 20
ActiveCell.Value = Decode(Sum)
End Sub
Function Decode(i)
Select Case i
Case 0: Decode = "It is certain."
Case 1: Decode = "It is decidedly so."
Case 2: Decode = "Without a doubt."
Case 3: Decode = "Yes - definately."
Case 4: Decode = "You may rely on it."
Case 5: Decode = "As I see it, yes."
Case 6: Decode = "Most likely."
Case 7: Decode = "Outlook Good."
Case 8: Decode = "Yes."
Case 9: Decode = "Signs point to yes."
Case 10: Decode = "Reply hazy, try again."
Case 11: Decode = "Ask again later."
Case 12: Decode = "Better not Tell You"
Case 13: Decode = "Cannot predict now."
Case 14: Decode = "Concentrate and ask again."
Case 15: Decode = "Don't count on it."
Case 16: Decode = "My reply is no."
Case 17: Decode = "My sources say no."
Case 18: Decode = "Outlook not so good."
Case 19: Decode = "Very doubtful."
End Select
End Function