If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Remember To Do the Following....Use tags when posting code to the thread,
Mark your thread as Solved if satisfied by using the Thread Tools options.
If posting the same issue to another forum please show the link

Sub Enable_All_Right_Click_Menus()
'This will enable all BuiltIn Command bars
Dim Cbar As CommandBar
For Each Cbar In Application.CommandBars
Cbar.Enabled = True
Next
End Sub

Formatting tags added by mark007

Place in the This Workbook module and let us know the result

Remember To Do the Following....Use tags when posting code to the thread,
Mark your thread as Solved if satisfied by using the Thread Tools options.
If posting the same issue to another forum please show the link

Not sure. For some reason Excel's command bars are not being read correctly on loading, hence the loss of the right click function. I was hoping that someone with more experience could assist here.

Remember To Do the Following....Use tags when posting code to the thread,
Mark your thread as Solved if satisfied by using the Thread Tools options.
If posting the same issue to another forum please show the link

Remember To Do the Following....Use tags when posting code to the thread,
Mark your thread as Solved if satisfied by using the Thread Tools options.
If posting the same issue to another forum please show the link

but should I always use this code when i use excel
I want know what's the problem
and why I can't use right click without code

It will happen when you have some other code which wants to "disable" right click for some reason. Check the codes that you run regularly, one of them will be having a code which will be opposite of what Aussiebear has provided.

It will happen when you have some other code which wants to "disable" right click for some reason. Check the codes that you run regularly, one of them will be having a code which will be opposite of what Aussiebear has provided.

Have a look in the last couple of Excel files you were using before the right click function failed. As Shrivallabha has been quietly suggesting, there might well be some code in there that changes the right click function. This is something that you need to do as we do not have access to your files. If you find something or think you've found something, please feel free to post it.

Remember To Do the Following....Use tags when posting code to the thread,
Mark your thread as Solved if satisfied by using the Thread Tools options.
If posting the same issue to another forum please show the link