怎样才能设置excel表重的自定义按钮鼠标右键点击不出现系统菜单

2025-02-23 19:01:14
推荐回答(2个)
回答1:

在按钮的鼠标事件中输入代码:
Private Sub CommandButton1_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
If Button = 2 Then Exit Sub '如果是右键,则退出
End Sub

回答2:

如果这个按钮,是指定的模块代码,怎么做到不能对按钮鼠标右键呢