1.定義變數
Dim username As String
'定義username為一個儲存字串(String)的變數
2.輸入視窗(InputBox)
username = InputBox("請輸入姓名:", "使用者輸入","姓名")
'將使用者輸入的姓名指定給username這個變數
3.輸出視窗(MsgBox)
MsgBox(username & "你好")
'username變數與"你好"字串合併,需使用&符號連結
Sub 輸出入練習()
Dim username As String
username = InputBox("請輸入姓名:", "使用者輸入", "姓名")
MsgBox (username & "你好")
End Sub