[英]VBA code example on Microsoft's website destroyed the clipboard for the rest of the computer. Why did this happen and how can I prevent it?
[英]How can I make it echo 'That's good' and 'Why not?' if 'Yes' and 'No' are selected respectively?
MsgBox "Are you fine?", vbYesNo, "Greeting"
K% = MsgBox "Are you fine?", vbYesNo, "Greeting"
Select Case K%
Case vbYes
WScript.Echo "That's good."
Case vbNo
WScript.Echo "Why not?"
End Select
我在.vbs文件中使用以上脚本来显示带有“是”和“否”按钮的消息框。 我希望它回显“很好”和“为什么不呢?” 如果分别选择“是”和“否”。 但是,它不起作用。 谁能告诉我这是怎么回事?
有几件事情是不对的:
%
符号。 将其重命名为其他名称。 MsgBox("Are you fine", vbYesNo, "Greeting")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.