Right-click mouse lost on Excel only

Koalacid Posted messages 70 Status Membre -  
 grisan29 -
Hello,

The right button on my mouse has not been working since this morning and I don't know why.

After trying (in vain) to find a checkbox in the options and attempting the following macro (and others found here and there), it still doesn't work.

Sub Restore_Click() 
Dim cbar As CommandBar
For Each cbar In CommandBars
If cbar.Type = msoBarTypePopup Then cbar.Enabled = True
Next cbar
End Sub


When I run the code, I get the following error message:
Compilation error - Method or data member not found.

Do you have any idea?

Best regards,

Configuration: Windows 7 / Mozilla 11.0

2 réponses

pilas31 Posted messages 1878 Status Contributeur 648
 
Hello,

I think a reference might be missing.
Go to the VBA editor, then to the "Tools" menu and "References"
Check the reference "Microsoft Office xx.x Object Library"
(for me it's Microsoft Office 14.0 Object Library)

--
Best regards,
8