Disabling Cut & Paste in Macro

  • Thread starter Thread starter Wim Ruepert
  • Start date Start date
W

Wim Ruepert

Does anybody know how you can prevent a user from
using the cut & paste option in a Excel Spreadsheet Application ?

I have tried incorporating the line
"Application.CutCopyMode = False" in a auto startup macro, but this does not
seem to work.

Any suggestions are welcome.
Thank You !!

Wim
 
You need to disable the commands and the menu items. Sub Auto_Open()
Application.Onkey "^x",""
Appllication.Onkey "^+x",""
Application.commandbars("Worksheet Menu
Bar").Controls("Edit").Controls("Cut").enabled = False
Application.commandbars("Cell").Controls("Cut").enabled = False
Application.commandbars("Worksheet Menu
Bar").Controls("Edit").Controls("Paste").enabled = False
Application.commandbars("Cell").Controls("Paste").enabled = False
Application.Commandbars("Toolbar List").Enabled = False
End Sub
Sub Auto_Close()
Application.Onkey "^x"
Appllication.Onkey "^+x"
Application.commandbars("Worksheet Menu
Bar").Controls("Edit").Controls("Cut").enabled = True
Application.commandbars("Cell").Controls("Cut").enabled = True
Application.commandbars("Worksheet Menu
Bar").Controls("Edit").Controls("Paste").enabled = True
Application.commandbars("Cell").Controls("Paste").enabled = True
Application.Commandbars("Toolbar List").Enabled = True
End Sub

Bob Umlas
Excel MVP
 
Back
Top