View Single Post
  #3   Report Post  
Keef
 
Posts: n/a
Default

thanks jim,
i'm a dill i found it... i will give it a go

regards
keef


"Jim Rech" wrote in message
...
I posted that code. Along with the antidote that you must have lost:

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,
| I recently put the following code in a spreed sheet and lost
the
| access to options (greyed out):
|
| 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
|
| This has effected both home and work computers, the only ones that i
| installed this code in... Any ideas?
|
| Regards
| Keef
|
|