I am trying to use the following code but I am getting 'Run-time error '5': Invalid procedure call or argument' at the line of code which should disable the 'insert'
Could anyone give me any advice. When trying to find help for this issue I have found the line of code numerous times and people don't report any issues.
I'm using Excel 2007 on XP [work] and Vista [home]
Thanks
Ste
Could anyone give me any advice. When trying to find help for this issue I have found the line of code numerous times and people don't report any issues.
Rich (BB code):
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
Application.CommandBars("cell").Reset
If Not Application.Intersect(Target, Range("A1:G10")) Is Nothing Then
With Application
.CommandBars("cell").Controls("delete...").Enabled = False
.CommandBars("cell").Controls("insert...").Enabled = False
End With
End Sub
I'm using Excel 2007 on XP [work] and Vista [home]
Thanks
Ste