我有一个有两个选项的列表框;一个是默认选项,但如果我单击其他,我希望它弹出一个输入框以获取信息。
我怎样才能做到这一点?
为此,您需要使用列表框 afterupdate 事件。它将返回用户输入的内容usrValue
。您将需要将 更改为List0
您的访问应用程序中的控件名称。
Private Sub List0_AfterUpdate()
Dim usrValue As String 'what the user will by saving there value into.
If List0.Value = "OTHER" Then
usrValue = InputBox("Please enter a value for me", "Need something")
End If
End Sub