Msgbox vbs 给了我预期的语句结束

Msgbox vbs gave me expected end of the statement

dim answer = call MsgBox("This will destroy your computer, Do you wish to proceed", 4, "WARNING!") 
If answer = 6 Then
    MsgBox "WORKS!"
End If

给了我 语句的预期结束 第 1 行 字符 12

你只需要分开声明你的answer变量和赋值提示结果:

Dim answer

answer = MsgBox("This will destroy your computer, Do you wish to proceed", 4, "WARNING!")

If answer = 6 Then
    MsgBox "WORKS!"
End If

(而且没有必要 call