Public Class Form1

    Private Sub Form1_Load(ByVal sender As Object, _
                            ByVal e As System.EventArgs) _
                            Handles MyBase.Load
        Dim a As String, i As Integer
        a = InputBox("要使用軟體嗎？(Y/N)", "詢問交談窗")
        If a = "Y" Then
            i = InputBox("請輸入軟體代號：1.Word 2.Excel 3.Access", _
                         "選擇代號")
            If i = 1 Then
                MsgBox("歡迎使用Word", , "Microsoft Word")
            ElseIf i = 2 Then
                MsgBox("歡迎使用Excel", , "Microsoft Excel")
            Else
                MsgBox("歡迎使用Access", , "Microsoft Access")
            End If
        Else
            MsgBox("謝謝您的使用", , "下次再見")
        End If
    End Sub
End Class
