Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim ck As Boolean = False
        Dim m, n As Short
        m = Int(TextBox1.Text)         '擷取月份資料
        n = Int(TextBox2.Text)         '擷取日期資料
        Select Case m                  '檢查出生日期
            Case 1, 3, 5, 7, 8, 10, 12 '判斷大月
                If n < 1 Or n > 31 Then ck = True
            Case 2                     '判斷2月
                If n < 1 Or n > 28 Then ck = True
            Case 4, 6, 9, 11           '判斷小月
                If n < 1 Or n > 30 Then ck = True
        End Select
        If ck = True Then
            MsgBox("輸入的日期資料不合理，請重新輸入！", , "檢查日期")
            TextBox1.Text = ""
            TextBox2.Text = ""
            TextBox1.Focus()
            Exit Sub
        End If
        '請在此撰寫判斷星座的程式敘述

    End Sub
End Class
