輸入框后VBA顯示MsgBox

輸入框后沒(méi)有彈出Messagebox。

Dim Output As Integer
Dim name As Variant
Output = MsgBox("Are You Interested in taking a short survey with me?", vbYesNo + vbQuestion, "Short Survey")
If Output = vbYes Then
MsgBox "Great! I'll guide you through this"
name = InputBox("First Question, What's your name?")
If name = vbYes Then
MsgBox "Welcome"
Else
End If
Else
MsgBox "Thanks! But you can try again if you change your mind"
End If
End Sub
? 最佳回答:

Change If name = vbYes Then to If name <> "" Then

當(dāng)您輸入一些文本時(shí),變量name獲取該文本,而不是vbYes

Dim Output As Integer
Dim name As Variant
Output = MsgBox("Are You Interested in taking a short survey with me?", vbYesNo + vbQuestion, "Short Survey")
If Output = vbYes Then
  MsgBox "Great! I'll guide you through this"
  name = InputBox("First Question, What's your name?")
  If name <> "" Then
    MsgBox "Welcome"
  End If
Else
  MsgBox "Thanks! But you can try again if you change your mind"
End If
主站蜘蛛池模板: 久久国产视频一区| 一区二区在线免费观看| 日韩一区精品视频一区二区| 国产成人精品一区二区A片带套 | 国产乱码一区二区三区爽爽爽| 国模大胆一区二区三区| 国产精品揄拍一区二区久久| 国产成人无码一区二区在线播放| 一区二区三区在线免费 | 国产精品视频无圣光一区| 制服丝袜一区在线| 无码精品人妻一区二区三区人妻斩 | 国产一区二区三区在线观看影院| 中文字幕一区二区三区5566| 国产a∨精品一区二区三区不卡| 国产无码一区二区在线| 亚洲午夜精品第一区二区8050| 立川理惠在线播放一区| 日韩AV无码一区二区三区不卡| 无码av中文一区二区三区桃花岛 | 无码人妻精品一区二区三| 免费日本一区二区| 无码精品黑人一区二区三区 | 国产精品高清视亚洲一区二区| 国产高清在线精品一区| 99精品国产一区二区三区2021 | 亚洲AV无码一区二区三区久久精品 | 性色av闺蜜一区二区三区| 韩国女主播一区二区| 狠狠爱无码一区二区三区| 日韩一区二区三区精品| 国产高清在线精品一区二区| 久久精品一区二区三区中文字幕 | 无码人妻久久一区二区三区免费 | 99精品一区二区免费视频| 日韩一区精品视频一区二区| 亚洲熟妇AV一区二区三区浪潮 | 亚洲一区二区三区偷拍女厕 | 日韩a无吗一区二区三区| 麻豆一区二区三区蜜桃免费| 国产成人精品a视频一区|