XL'97 - Cut CommandButton Anomoly
If the code is being executed from a commandbutton then change that
commandbutton's TakeFocusOnClick property to false.
--
Regards,
Tom Ogilvy
"RWN" wrote in message
...
This is more of a "huh" question than a major problem.
An associate at work wrote the following code;
"ActiveSheet.Shapes("CommandButton1").Select
Selection.Cut"
It causes an error when the "Selection Cut" statement attempts to
execute. It states that the cut method is invalid on an OLE object (or
words to that effect).
It runs fine in XL 2k & 03 *and* can also be executed without problem in
the immediate VBA window in '97.
As I said, it is not major (I replaced the "ActiveSheet.....Select" with
"ActiveSheet....Delete") and killed the "Selection.Cut" statement.
I'm just wondering what I'm not understanding (albeit there are many
things that confuse me!).
--
Regards;
Rob
------------------------------------------------------------------------
|