I ran this macro:
Option Explicit
Sub testme()
Application.CommandBars("cell").Controls("copy").Enabled = False
End Sub
I rightclicked on a cell and the copy option was disabled.
I closed excel and reopened it (without resetting the toolbar).
The copy option was still greyed out.
I closed excel and dumped my *.xlb file and restarted excel.
I lost all my customizations, but the Copy option was back.
(then I closed excel and copied my backup toolbar file to its rightful spot!!!)
===
I did do this testing after I read your message <bg>, but I think I had tested
this before.
And those customizations have to be stored somewhere.
===
I think the real question is why didn't your suggestion:
Application.CommandBars("Cell").Enabled = True
work.
I would have guessed it would.
But maybe doing both these would make it work:
Application.CommandBars("Cell").reset
Application.CommandBars("Cell").Enabled = True
(but the reset will destroy customizations to just the rightclick menu.)
That, I don't have a theory.
David said:
Hi John,
Be sure to report back what corrected your problem.
If you do dump your Tool Bars file (.XLB), would suggest
that you document what you have so that you can
recreate them later.
http://www.mvps.org/dmcritchie/excel/barhopper.htm
Dave P., any idea why you think Tool Bars might be implicated?
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages:
http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page:
http://www.mvps.org/dmcritchie/excel/search.htm
Dave Peterson said:
Can you try another test?