Disable all menu except Right Click Mouse

accessman2

Registered User.
Local time
Today, 08:59
Joined
Sep 15, 2005
Messages
335
Hi,

For i = 1 To CommandBars.count
If (CommandBars(i).name <> "Right Click Mouse") Then
CommandBars(i).Enabled = False
End If
Next i

I tried to use this code.
However, right click mouse is disable.

How can I disable all menus except the right click mouse option?

Thanks.
 
I am needing to know an answer on this one, preferred on how to create my own custom right click as well.
 
See the article here on making a popup menu:

Make Access Command Buttons Work Harder


Then use this code to bring the menu up on a right click:

Code:
Private Sub PictureFrame_MouseUp(Button As Integer, Shift As Integer, x As Single, Y As Single)
On Error Resume Next

Select Case Button

    Case 2 'RIGHT CLICK
                
            Set objPopUp = CommandBars("PictureMenu") 'put the name of the popup menu you created here
            objPopUp.showpopup
            Set objPopUp = Nothing
        
End Select
    
End Sub


I use this method with very good results.

Hope this helps.

Larry
 
Last edited:

Users who are viewing this thread

Back
Top Bottom