Disable Right Click
Forgot to post the finalized code. Edited a bit and untested:
Private Sub Worksheet_BeforeRightClick _
(ByVal Target As Range, Cancel As Boolean)
'Turn off right mouse click and display message
Dim msg As String
Cancel = True
msg = "You are not authorized to delete this sheet" & _
Chr(10) & Chr(10) & "Make all changes on Main Page"
MsgBox msg
End Sub
Karen53 wrote:
Hi,
All of my research says this is the correct formula. However it is not
working. Am I missing something?
Private Sub Worksheet_BeforeRightClick _
(ByVal Target As Range, Cancel As Boolean)
'Turn off right mouse click and display message
Dim msg As String
Cancel = True
msg = ("You are not authorized to delete this sheet") & vbCtlf
msg = msg & vbCtlf
msg = msg & ("Make all changes on Main Page")
End Sub
Thanks
|