Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
hi guys,
my workmates are cutting in a spreedsheet and removing borders etc. how can i stop the cut function. regards keef |
#2
![]() |
|||
|
|||
![]()
ere's some code that does the trick, along with disabling drag and down and
the ability to turn D&D back on. Sub DisableCuts() Dim oCtls As CommandBarControls, oCtl As CommandBarControl Set oCtls = CommandBars.FindControls(ID:=21) ''Cut If Not oCtls Is Nothing Then For Each oCtl In oCtls oCtl.Enabled = False Next End If Set oCtls = CommandBars.FindControls(ID:=522) ''Options If Not oCtls Is Nothing Then For Each oCtl In oCtls oCtl.Enabled = False Next End If With Application .OnKey "^x", "" .OnKey "+{Del}", "" .CellDragAndDrop = False End With End Sub Sub EnableCuts() Dim oCtls As CommandBarControls, oCtl As CommandBarControl Set oCtls = CommandBars.FindControls(ID:=21) If Not oCtls Is Nothing Then For Each oCtl In oCtls oCtl.Enabled = True Next End If Set oCtls = CommandBars.FindControls(ID:=522) If Not oCtls Is Nothing Then For Each oCtl In oCtls oCtl.Enabled = True Next End If With Application .OnKey "^x" .OnKey "+{Del}" .CellDragAndDrop = True End With End Sub -- Jim Rech Excel MVP "Keef" wrote in message ... | hi guys, | my workmates are cutting in a spreedsheet and removing borders | etc. how can i stop the cut function. | | regards | keef | | |
#3
![]() |
|||
|
|||
![]()
hi jim,
thanks for your reply, i can't seem to get this working.. no errors are showing but i can still cut also regards keef "Jim Rech" wrote in message ... ere's some code that does the trick, along with disabling drag and down and the ability to turn D&D back on. Sub DisableCuts() Dim oCtls As CommandBarControls, oCtl As CommandBarControl Set oCtls = CommandBars.FindControls(ID:=21) ''Cut If Not oCtls Is Nothing Then For Each oCtl In oCtls oCtl.Enabled = False Next End If Set oCtls = CommandBars.FindControls(ID:=522) ''Options If Not oCtls Is Nothing Then For Each oCtl In oCtls oCtl.Enabled = False Next End If With Application .OnKey "^x", "" .OnKey "+{Del}", "" .CellDragAndDrop = False End With End Sub Sub EnableCuts() Dim oCtls As CommandBarControls, oCtl As CommandBarControl Set oCtls = CommandBars.FindControls(ID:=21) If Not oCtls Is Nothing Then For Each oCtl In oCtls oCtl.Enabled = True Next End If Set oCtls = CommandBars.FindControls(ID:=522) If Not oCtls Is Nothing Then For Each oCtl In oCtls oCtl.Enabled = True Next End If With Application .OnKey "^x" .OnKey "+{Del}" .CellDragAndDrop = True End With End Sub -- Jim Rech Excel MVP "Keef" wrote in message ... | hi guys, | my workmates are cutting in a spreedsheet and removing borders | etc. how can i stop the cut function. | | regards | keef | | |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Averaging function | Excel Discussion (Misc queries) | |||
Access Module coded converted to Excel Function | Excel Discussion (Misc queries) | |||
Function in XL or in VBA for XL that pulls numeric digits from a t | Excel Discussion (Misc queries) | |||
Excel function help facilities | Excel Discussion (Misc queries) | |||
I cant use englisch function names in a swedich version of excel | Excel Discussion (Misc queries) |