right click

  • Thread starter Thread starter geebee
  • Start date Start date
G

geebee

hi,

i would like to know how i can prvent users from right-clicking on a pivot
table?

htanks in advance,
geebee
 
geebee,

Copy this code, right-click the sheet tab, select "View Code" and paste the code into the window
that appears.
You can limit which cells it disables by using the Target range object....

HTH,
Bernie
MS Excel MVP

Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
Cancel = True
End Sub
 
geebee,

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Cancel = True
End Sub

HTH,
Bernie
MS Excel MVP
 
Back
Top