Monday, June 15, 2020

VBA Disable right click on all sheets of workbook

DISABLE RIGHT CLICK ON ALL SHEETS OF WORKBOOK

Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
    Cancel = True   '' disable right click on all sheets
End Sub



DISABLE RIGHT CLICK ON ALL SHEET TABS OF WORKBOOK

Private Sub Workbook_Deactivate()
    Application.CommandBars("Ply").Enabled = False
End Sub


No comments:

Post a Comment

Hot Topics