Consulting

Results 1 to 7 of 7

Thread: Solved: disable move or copy sheet

  1. #1

    Solved: disable move or copy sheet

    hi all
    How to disable option move or copy?

  2. #2

    disable right click ik the tab sheet

    How to disable right click on the tab sheet?

  3. #3
    VBAX Regular
    Joined
    Dec 2012
    Location
    Kabul - Afghanistan
    Posts
    40
    Location
    You can easily disable move or copy sheet by protect workbook in Review tab and you don't need to disable right click because by protecting workbook the options (Insert, Delete, Rename, Move or copy sheet, Tab color, Hide, Unhide)
    will be disable. Just protect workbook (check the structure and uncheck the windows). Also you can edit your workbook when it is protected.
    I like to be help full to my dear friends and I like Help full friends. Because ( A Friend in need is A Friend in dead)

  4. #4

    disable right click

    Quote Originally Posted by Esmatullah
    You can easily disable move or copy sheet by protect workbook in Review tab and you don't need to disable right click because by protecting workbook the options (Insert, Delete, Rename, Move or copy sheet, Tab color, Hide, Unhide)
    will be disable. Just protect workbook (check the structure and uncheck the windows). Also you can edit your workbook when it is protected.
    Hi everyone
    Thanks for the response, my good friend
    But I wanted to know whether the code can be deactivated completely, right click on the sheet tab??

  5. #5
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,368
    Location
    If you mean you wish to disable this particular context menu, try:

    In the ThisWorkbook Module:
    [VBA]Option Explicit

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

    Private Sub Workbook_Deactivate()
    Application.CommandBars("Ply").Enabled = True
    End Sub[/VBA]

  6. #6

    a

    Quote Originally Posted by GTO
    If you mean you wish to disable this particular context menu, try:

    In the ThisWorkbook Module:
    [vba]Option Explicit

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

    Private Sub Workbook_Deactivate()
    Application.CommandBars("Ply").Enabled = True
    End Sub[/vba]
    Thank you very much
    I've solved the problem with your code

  7. #7
    But you can still access the move/copy sheets item from the ribbon...
    Regards,

    Jan Karel Pieterse
    Excel MVP jkp-ads.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •