Hi
I have written the code below to add the paste values function to the cell command bars. The only problem is that it works in Excel XP but when I try using it in '97 I get a Range object runtime error. Any suggestions???
Sub AddItemToShortcut()
Set NewItem = CommandBars("cell").Controls.Add
With NewItem
.Caption = "Paste Values"
.FaceId = 370
.OnAction = "PasteValue"
.BeginGroup = True
End With
End Sub
Sub RemoveItem()
On Error Resume Next
CommandBars("cell").Controls("Paste Values").Delete
End Sub
Sub PasteValue()
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub