Posted to microsoft.public.excel.programming
|
|
Map of controls-numbers
thanks a lot
"Bob Phillips" wrote in message
...
That is because you are using an index, that is the 5th element in the
collection, not the id
Try
Set ctl = Application.CommandBars("File").FindControl(ID:=74 8)
ctl.Enabled = False
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Mircea Pleteriu" wrote in message
...
This is my code which handles the Save As option.
// Disable "Save As" menu option
this.excelApp.CommandBars["File"].Controls[5].Enabled = false;
The code crashes with "Invalid index" if I use 748 instead of 5.
Am I missing something?
"Bob Phillips" wrote in message
...
I haven't found anything about changes (apart from the structure of
Autosum,
and I have just tested it on XL 2000 and 2002, and on both SaveAs has
an
id
of 748.
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Mircea Pleteriu" wrote in message
...
The article says that File.Save As has the ID of 748.
But my code crashes for this code. Somebody else on another forum
said
that
5 is the correct ID for File.Save As.
I tested and I worked.
I'm confused about that.
"Bob Phillips" wrote in message
...
I think it is the same as Excel 2000. I gave the 97 and 2000 links
as
I
think some changed after XL97.
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Mircea Pleteriu" wrote in message
...
Is there no list of ID numbers for Excel 2002(3) ?!?
"Bob Phillips" wrote in
message
...
Mircea,
Here is a starter for you
http://support.microsoft.com/default.aspx?kbid=159466
XL97: List of ID Numbers for Built-In Command Bar Controls
http://support.microsoft.com/default.aspx?kbid=213552
XL2000: List of ID Numbers for Built-In CommandBar Controls
http://support.microsoft.com/default.aspx?kbid=162814
XL97: Sample Macros to Return ID for a CommandBar Control
http://support.microsoft.com/default.aspx?kbid=213211
XL2000: Sample Macros to Return ID for a CommandBar Control
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Mircea Pleteriu" wrote in
message
...
I know that each control (menu option) has a number assign
to
it.
Where from can I get this map?
Thanks,
Mircea
|