Index of Projects [back] RealBasic Source Code - Month? What Month?
Window1.btnMonth.Action:
Sub Action()
dim Month As integer
Month = Val(EdtMonthNum.text)
Select Case Month
Case 1
MsgBox "It's January"
Case 2
MsgBox "It's Febuary"
Case 3
MsgBox "It's March"
Case 4
MsgBox "It's April"
Case 5
MsgBox "It's May"
Case 6
p> MsgBox "It's June"
Case 7
MsgBox "It's July"
Case 8
MsgBox "It's August"
Case 9
MsgBox "It's September"
Case 10
MsgBox "It's October"
Case 11
MsgBox "It's November"
Case 12
MsgBox "It's December"
Else
MsgBox "You have entered an invalid number"
End Select
End Sub
Window1.btnQuit.Action:
Sub Action()
Quit
End Sub
Window1.BtnNumber.Action:
Sub Action()
If edtMonthName.text = "January" then
MsgBox "This is the 1st month"
Elseif edtMonthName.text = "Febuary" then
MsgBox "This is the 2nd month"
Elseif edtMonthName.text = "March" then
MsgBox "This is the 3rd month"
Elseif edtMonthName.text = "April" then
MsgBox "This is the 4th month"
Elseif edtMonthName.text = "May" then
MsgBox "This is the 5th month"
Elseif edtMonthName.text = "June" then
MsgBox "This is the 6th month"
Elseif edtMonthName.text = "July" then
MsgBox "This is the 7th month"
Elseif edtMonthName.text = "August" then
MsgBox "This is the 8th month"
Elseif edtMonthName.text = "September" then
MsgBox "This is the 9th month"
Elseif edtMonthName.text = "October" then
MsgBox "This is the 10th month"
Elseif edtMonthName.text = "November" then
MsgBox "This is the 11th month"
Elseif edtMonthName.text = "December" then
MsgBox "This is the 12th month"
Else
MsgBox "Please enter a valid month. (First
letter capitalized, no abreviations)"
End If
End Sub
Window1.btnClear.Action:
Sub Action()
edtMonthName.text=""
edtMonthNum.text=""
End Sub