View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
KS[_2_] KS[_2_] is offline
external usenet poster
 
Posts: 5
Default Rewrite cut action not working.

Why isn't this working? I get an "object variable or with block not
set" error.



Sub MyCopy()
'rewrite Ctrl-X
Selection.Copy
MsgBox "Please copy [Ctrl-C] rather than cut."
End Sub



Sub mycut()
ActiveWorkbook.CommandBars("Standard").Controls("C ut").OnAction =
"MyCopy"
ActiveWorkbook.CommandBars("Cell").Controls("cut") .OnAction =
"MyCopy"

End Sub