Dim user As String '''最後將String改成Integer
Dim msg As String
user = InputBox("請輸入你要刪除的檔案名稱:", "刪除檔案")
msg = MsgBox("要將 " + user + " 丟到資源回收筒?", vbOKCancel + vbInformation,
"確認刪除檔案!")
'''先試著將" + user + "的「"」移去,還原後再將「+」移去
Print msg '以Print的方式顯示MsgBox
End Sub
Private Sub Form_Load()
10 Dim a, m As Single '若宣告成String或Integer會有什麼影響?
20 a = InputBox("請輸入你的年齡:", "零用錢計算程式")
30 m = (a - 10) * 10 - 15
40 MsgBox "你的零用錢最多不可超過:" & m, vbOKOnly + vbInformation , "零用錢計算結果"
'將 & 改成 + 試試看!'''
End Sub