vba窗体复合框。
vba窗体复合框。高分求助大神。关于复合框的所有事件及简介,重点求助介绍①点击下拉列表(箭头)事件②选中列表后事件(值出现后)③手动输入值回车事件...
vba窗体复合框。高分求助大神。关于复合框的所有事件及简介,重点求助介绍①点击下拉列表(箭头)事件②选中列表后事件(值出现后)③手动输入值回车事件
展开
2个回答
展开全部
Private Sub ComboBox1_AfterUpdate()
'在通过用户界面更改了控件中的数据后,此事件发生
End Sub
Private Sub ComboBox1_BeforeDragOver(ByVal Cancel As MSForms.ReturnBoolean, ByVal Data As MSForms.DataObject, ByVal X As Single, ByVal Y As Single, ByVal DragState As MSForms.fmDragState, ByVal Effect As MSForms.ReturnEffect, ByVal Shift As Integer)
'当拖放操作正在进行时该事件发生
End Sub
Private Sub ComboBox1_BeforeDropOrPaste(ByVal Cancel As MSForms.ReturnBoolean, ByVal Action As MSForms.fmAction, ByVal Data As MSForms.DataObject, ByVal X As Single, ByVal Y As Single, ByVal Effect As MSForms.ReturnEffect, ByVal Shift As Integer)
'当用户即将在一个对象上放置或粘贴数据时,该事件发生
End Sub
Private Sub ComboBox1_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
'控件中的数据被改变之前该事件发生
End Sub
Private Sub ComboBox1_Change()
'当Value属性改变时该事件发生
End Sub
Private Sub ComboBox1_Click()
'单击
End Sub
Private Sub ComboBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
'双击
End Sub
Private Sub ComboBox1_DropButtonClick()
’当下拉列表出现或消失时,该事件发生
End Sub
Private Sub ComboBox1_Enter()
'激活
End Sub
Private Sub ComboBox1_Error(ByVal Number As Integer, ByVal Description As MSForms.ReturnString, ByVal SCode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, ByVal CancelDisplay As MSForms.ReturnBoolean)
'当控件检测到一个错误,并且不能将该错误信息返回调用程序时该事件发生
End Sub
Private Sub ComboBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
'按下键盘按键
End Sub
Private Sub ComboBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
'键盘输入
End Sub
Private Sub ComboBox1_KeyUp(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
'释放键盘按键
End Sub
Private Sub ComboBox1_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
'按下鼠标
End Sub
Private Sub ComboBox1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
'鼠标移动
End Sub
Private Sub ComboBox1_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
'释放鼠标
End Sub
追问
可以只让下拉赋值吗?即不允许手动输入大神😂
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |