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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

GetPivotData 3
pivot table showing text 3
change formula dynamically 1
determine dropdown value 1
calculated field 1
activate VBA 2
items in pivot's page section 3
simulate clicking OK in msgbox 12

Back
Top