Right-click pop-up menu disabled

dellamic

New Member
Joined
Apr 10, 2013
Messages
2
I have written a VBA procedure in Excel 2010 that tries to hidden commandbars and prevents several actions from the user.
I have included and run this code:

Dim Cbar As CommandBar
For Each Cbar In Application.CommandBars
Cbar.Enabled = False
Next

Now, when I opn ANY excel file the righ-click gives no action. I have to run a procedure with the same lines, but
Cbar.Enabled = True
to have the pop-up menu available with the right mouse button. The right-click works correctly in all other Office programs (word, etc)

Someone can help me ?

Thanks

Mauro
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Assuming you don't have that disable code running every time you start Excel then possibly you have a corrupt xlb file (this stores your user customisations such as menu bars). With Excel closed, search for a file of filename .xlb on your harddrive and once found change its extension to xlbOLD and restart Excel. Hopefully you will still have your right-click menu then.
 
Upvote 0
Assuming you don't have that disable code running every time you start Excel then possibly you have a corrupt xlb file (this stores your user customisations such as menu bars). With Excel closed, search for a file of filename .xlb on your harddrive and once found change its extension to xlbOLD and restart Excel. Hopefully you will still have your right-click menu then.

GREAT: It solves the problem !

Many thanks
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top