Consulting

Results 1 to 7 of 7

Thread: Disable Cut Copy Paste in Excel 2007

  1. #1
    VBAX Regular
    Joined
    Mar 2009
    Posts
    10
    Location

    Thumbs up Disable Cut Copy Paste in Excel 2007

    How to Disabel Cut copy paste button in Excel 2007 from Home tab

  2. #2
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,711
    Location
    You can use the CustomUI editor to disable controls

    [VBA]
    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
    <!--
    *********************************************************************-->
    <!--
    **********Disable and Repurposing controls on the ribbon*************-->
    <!--
    *********************************************************************-->
    <!--
    *You can find the Control names in one of the downloads on this page*-->
    <!--
    ***************http://www.rondebruin.nl/ribbon.htm*******************-->
    <!--
    *********************************************************************-->
    <
    commands>
    <
    command idMso="Cut"enabled = "false" />
    <
    command idMso="Copy"enabled = "false"/>
    <
    command idMso="Paste"enabled = "false"/>
    </
    commands>
    </
    customUI
    [/VBA]


    Paul

  3. #3
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    I know this is a little late, but just a caveat here. Modifying the XML via the customUI editor will disable the commands on the ribbon and the right click menus, but it won't disable the keyboad shortcut to do the task. (i.e. CTRL+C still copies and CTRL+V still pastes.)

    If you want to remove the ability to do copy/paste completely, you'll need to craft some code to overrule the keyboard shortcuts. This KB article does still work in 2007, although it does have some extra overhead that isn't needed to control the (old) menus.
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





  4. #4
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,711
    Location
    Hi Ken -- haven't seen you in the forum for awhile

    Paul

  5. #5
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    Yeah, I know. Been very busy offline writing, teaching and trying to keep up with the emails through my site. That and balancing off with family life of course.

    I'm hoping to pop in a little more frequently.
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





  6. #6
    I am trying to add this code to the disable copy and paste code from the KB article. Where does this go? I know that you said the Custom UI Editor. However, I'm not finding that under the VBA area.

    thanks!














    Quote Originally Posted by Paul_Hossler
    You can use the CustomUI editor to disable controls

    [vba]
    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
    <!--
    *********************************************************************-->
    <!--
    **********Disable and Repurposing controls on the ribbon*************-->
    <!--
    *********************************************************************-->
    <!--
    *You can find the Control names in one of the downloads on this page*-->
    <!--
    ***************http://www.rondebruin.nl/ribbon.htm*******************-->
    <!--
    *********************************************************************-->
    <
    commands>
    <
    command idMso="Cut"enabled = "false" />
    <
    command idMso="Copy"enabled = "false"/>
    <
    command idMso="Paste"enabled = "false"/>
    </
    commands>
    </
    customUI
    [/vba]

    Paul

  7. #7
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    Hi FoxPro,

    The CustomUIEditor is a separate download used to modify the XML required to architect a solution for the Office 2007 ribbon. The code you quoted is not VBA, it's XML, which is the language used in the Office 2007 OpenXML file format.

    You can download the CustomUIEditor here.
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





Posting Permissions

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