Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have inserted a checkBox in a chart. I need to refer to it programatically,
buy I must not use the control's name, because I plan to copy-paste the sheet (chart is embedde on it) many times, and control (two checkboxes and one command button) names change. I have tried to search it by type (an later by 'caption' -it doesnt change through copy-paste), in OLEObjects collection For each obj in ActiveChart.OLEObjects But ActiveCharts.OLEObjects is an empty collection for me. Can you help me with this problem? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Sub GetMeThere() Dim obj As Shape For Each obj In ActiveChart.Shapes MsgBox obj.TextFrame.Characters.Caption 'or Text Next End Sub -- No, it has never made a whole lot of sense to me either. <g Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware (Excel Add-ins / Excel Programming) "Francisco Gomez" wrote in message I have inserted a checkBox in a chart. I need to refer to it programatically, buy I must not use the control's name, because I plan to copy-paste the sheet (chart is embedde on it) many times, and control (two checkboxes and one command button) names change. I have tried to search it by type (an later by 'caption' -it doesnt change through copy-paste), in OLEObjects collection For each obj in ActiveChart.OLEObjects But ActiveCharts.OLEObjects is an empty collection for me. Can you help me with this problem? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
THANK YOU! (I never expected a checkbox to be a shape... :) )
"Jim Cone" wrote: Sub GetMeThere() Dim obj As Shape For Each obj In ActiveChart.Shapes MsgBox obj.TextFrame.Characters.Caption 'or Text Next End Sub -- No, it has never made a whole lot of sense to me either. <g Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware (Excel Add-ins / Excel Programming) "Francisco Gomez" wrote in message I have inserted a checkBox in a chart. I need to refer to it programatically, buy I must not use the control's name, because I plan to copy-paste the sheet (chart is embedde on it) many times, and control (two checkboxes and one command button) names change. I have tried to search it by type (an later by 'caption' -it doesnt change through copy-paste), in OLEObjects collection For each obj in ActiveChart.OLEObjects But ActiveCharts.OLEObjects is an empty collection for me. Can you help me with this problem? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Another way:
Dim CBX As CheckBox For Each CBX In ActiveChart.CheckBoxes MsgBox CBX.Caption Next CBX Francisco Gomez wrote: I have inserted a checkBox in a chart. I need to refer to it programatically, buy I must not use the control's name, because I plan to copy-paste the sheet (chart is embedde on it) many times, and control (two checkboxes and one command button) names change. I have tried to search it by type (an later by 'caption' -it doesnt change through copy-paste), in OLEObjects collection For each obj in ActiveChart.OLEObjects But ActiveCharts.OLEObjects is an empty collection for me. Can you help me with this problem? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Refer to control on userform from code module | Excel Programming | |||
A way refer to a control itself in an event handler | Excel Programming | |||
Refer to a control name from another sheet | Excel Programming | |||
.NET Custom Control not redrawing when inserted as OleObject in Excel | Excel Programming | |||
Data pts do not show up in chart when inserted, Help? | Charts and Charting in Excel |