+ Reply to Thread
Results 1 to 2 of 2

protect sheets against cutting / pasting

  1. #1
    UllidIreland
    Guest

    protect sheets against cutting / pasting

    (possibly as an option when protecting sheets)
    cells can be protected within a worksheet but this does not prevent novice
    users from cutting (sometimes accidentally by clicking/dragging) and pasting
    to other unprotected areas, which may materially affect the integrity of the
    spreadsheet



    ----------------
    This post is a suggestion for Microsoft, and Microsoft responds to the
    suggestions with the most votes. To vote for this suggestion, click the "I
    Agree" button in the message pane. If you do not see the button, follow this
    link to open the suggestion in the Microsoft Web-based Newsreader and then
    click "I Agree" in the message pane.

    http://www.microsoft.com/office/comm...heet.functions

  2. #2
    Forum Contributor
    Join Date
    06-01-2006
    Posts
    324
    I got this from OzGrid,

    Put this in ThisWorkbook



    Private Sub Workbook_Activate()
    Dim oCtrl As Office.CommandBarControl

    'Disable all Cut menus
    For Each oCtrl In Application.CommandBars.FindControls(ID:=21)
    oCtrl.Enabled = False
    Next oCtrl

    'Disable all Copy menus
    For Each oCtrl In Application.CommandBars.FindControls(ID:=19)
    oCtrl.Enabled = False
    Next oCtrl

    Application.CellDragAndDrop = False

    End Sub


    Private Sub Workbook_Deactivate()
    Dim oCtrl As Office.CommandBarControl

    'Enable all Cut menus
    For Each oCtrl In Application.CommandBars.FindControls(ID:=21)
    oCtrl.Enabled = True
    Next oCtrl

    'Enable all Copy menus
    For Each oCtrl In Application.CommandBars.FindControls(ID:=19)
    oCtrl.Enabled = True
    Next oCtrl

    Application.CellDragAndDrop = True

    End Sub


    Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
    With Application
    .CellDragAndDrop = False
    .CutCopyMode = False 'Clear clipboard
    End With
    End Sub
    Google is your best friend!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1