Disabling Right Click in Excel VBA

Disabling right click in Excel is not a rocket science. But when I googled it, I found many answers. But none of them were precise or upto the point. Somewhere, too exhaustive and complex whereas other where not upto the mark. So, I thought why not add one more blog on the same.

This is quite easy.

1. Open an Excel -Workbook

2. Go to Developer Tab

3. Click on the "ThisWorkbook" in the left hand side of the Microsoft Visual Basic window







4. Select Workbook and SheetBeforeRightClick from the drop down list


5. Add "Cancel=True"  line in between Sub and End Sub


Try, right click in any sheet. Did you see anything??

Happy VBA..ing