CommandBarControl object
Hi Dave (and JP),
Thank you both for your suggestions, but neither 'application.' nor
'office.' makes any difference.
What I really do not understand is the code works in its own spreadsheet,
but fails with a compile error when I put it in my existing spreadsheet.
Could it be that my spreadsheet was created in an older version of Excel and
is missing some add-in or other?
By the way, the code I have downloaded comes from the file
'AddingCustomMenus.zip'. on Ozgrid
Very confused,
Fred
"Dave Peterson" wrote:
Maybe qualifying it would help:
Dim xxx as application.commandbarcontrol
Fred Davis wrote:
I want to embed a custom menu in an old (working) spreadsheet.
I have downloaded a number of pre-written solutons which all work when used
in the original spreadsheet downloaded. However, when I cut and paste the
code into my spreadsheet I get the compiler error "User-defined type not
defined" on the statement _dim xxx as CommandBarControl_.
WHY?
If it works on its own, why won't it work in my spreadsheet?
I have been struggling with this for too many hours now so any help will be
greatly appreciated.
Thanks,
Fred
--
Dave Peterson
|