J
Jonsson
Hi,all
I want a macro that disable the function "cut" in a woorkbook and I found
this macro down below, in a previous thread.
But it doesnt work for me.
I get an error at "Application.commandbars("Worksheet
MenuBar").Controls("Edit").Controls("Cut").enabled = False/True"
when I try to open/close the workbook.
I have put this into a module.
Could it be because I have a swedish version of MSOffice?
Thanks in advance
//Thomas
Sub Auto_Open()
Application.Onkey "^x",""
Application.Onkey "^+x",""
Application.commandbars("Worksheet
MenuBar").Controls("Edit").Controls("Cut").enabled = False
Application.commandbars("Cell").Controls("Cut").enabled = False
Application.commandbars("Worksheet
MenuBar").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"
Application.Onkey "^+x"
Application.commandbars("Worksheet
MenuBar").Controls("Edit").Controls("Cut").enabled = True
Application.commandbars("Cell").Controls("Cut").enabled = True
Application.commandbars("Worksheet
MenuBar").Controls("Edit").Controls("Paste").enabled = True
Application.commandbars("Cell").Controls("Paste").enabled = True
Application.Commandbars("Toolbar List").Enabled = True
End Sub
I want a macro that disable the function "cut" in a woorkbook and I found
this macro down below, in a previous thread.
But it doesnt work for me.
I get an error at "Application.commandbars("Worksheet
MenuBar").Controls("Edit").Controls("Cut").enabled = False/True"
when I try to open/close the workbook.
I have put this into a module.
Could it be because I have a swedish version of MSOffice?
Thanks in advance
//Thomas
Sub Auto_Open()
Application.Onkey "^x",""
Application.Onkey "^+x",""
Application.commandbars("Worksheet
MenuBar").Controls("Edit").Controls("Cut").enabled = False
Application.commandbars("Cell").Controls("Cut").enabled = False
Application.commandbars("Worksheet
MenuBar").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"
Application.Onkey "^+x"
Application.commandbars("Worksheet
MenuBar").Controls("Edit").Controls("Cut").enabled = True
Application.commandbars("Cell").Controls("Cut").enabled = True
Application.commandbars("Worksheet
MenuBar").Controls("Edit").Controls("Paste").enabled = True
Application.commandbars("Cell").Controls("Paste").enabled = True
Application.Commandbars("Toolbar List").Enabled = True
End Sub