Hi,
I've added the line msgbox msg, confimed my code is on the correct sheet but
it still allows me to right click. I am able to right click and rename the
sheet. Is there anything alse I need to do?
Thanks,
"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
|