Public Class Form1

    Private Sub Form1_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated
        Dim d As Date     'd用來存放使用者輸入的日期資料
        Dim i As Integer  'i用來存放判斷星期幾的結果
        Dim w As Char     'w用來存放比對變數i值後的中文星期幾，即日∼六
        '請在下面撰寫程式敘述


        Select Case i
            Case 0 : w = "日"
            Case 1 : w = "一"
            Case 2 : w = "二"
            Case 3 : w = "三"
            Case 4 : w = "四"
            Case 5 : w = "五"
            Case 6 : w = "六"
        End Select
        MsgBox(d & " 是星期" + w, , "查詢特定日期是星期幾？")
        End
    End Sub
End Class
