網頁文章 網頁文章

 

 '此程式一旦按下取消會出錯'

Module Module1
    Sub Main()
        Dim X, Y, Z As Double
        X = InputBox("請輸入第一個數字", "輸入數字1")
        Y = InputBox("請輸入第二個數字", "輸入數字2")
        Z = InputBox("請輸入第三個數字", "輸入數字3")
        MsgBox(X + Y + Z, MsgBoxStyle.Information, "總和")
    End Sub
End Module