ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   See names of controls (https://www.excelbanter.com/excel-discussion-misc-queries/97989-see-names-controls.html)

TheMath

See names of controls
 
When I use the Forms Toolbar to put a checkbox on a worksheet, it names the
control 'Check Box 1' and sets its Text property to that name. That's nice,
except that I always change it (right-click and Edit Text) so that the text
is something else, and then I cannot see the name of the control after the
edit of the Text.

When I use OLE to access (read the state of) the checkbox from an external
program, it needs to know the name of the control. Since the Text property
was edited to something other than the original control name, the only way
I've found to determine the name of the control in Excel is to right-click on
it and choose "Assign Macro" because the propsed macro name has the control
name embedded in it.

Is there some more convenient way to tell the name of a checkbox control on
a spreadsheet?

--
I am The Math. You know what to do.


Nick Hodge

See names of controls
 
TheMath

It remains in the 'name' box. (Left of the formula bar)

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
HIS


"TheMath" wrote in message
...
When I use the Forms Toolbar to put a checkbox on a worksheet, it names
the
control 'Check Box 1' and sets its Text property to that name. That's
nice,
except that I always change it (right-click and Edit Text) so that the
text
is something else, and then I cannot see the name of the control after the
edit of the Text.

When I use OLE to access (read the state of) the checkbox from an external
program, it needs to know the name of the control. Since the Text
property
was edited to something other than the original control name, the only way
I've found to determine the name of the control in Excel is to right-click
on
it and choose "Assign Macro" because the propsed macro name has the
control
name embedded in it.

Is there some more convenient way to tell the name of a checkbox control
on
a spreadsheet?

--
I am The Math. You know what to do.




TheMath

See names of controls
 
I now see that the control name is there in the Name Box when the control is
dropped onto the spreadsheet, and that when I move to some other control by
pressing <Esc or by just clicking on some other cell, then returning to the
checkbox cell using the arrow keys results in the Name Box showing the cell
row and column instead of the component name. If I right-click on the cell,
then it is highlighted in a different mode, and the Name Box once again shows
the name of the control.

This is handier than having to follow that with a menu selection just to see
the control name.

I can then <Tab to subsequent cells that contain checkboxes and each of
them are selected in this alternate mode, with the Name Box showing the
control name, as desired. Thanks Nick.

--
I am the math. You know what to do.

"Nick Hodge" wrote:

TheMath
It remains in the 'name' box. (Left of the formula bar)




All times are GMT +1. The time now is 03:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com