ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   shapes textbox name.. (https://www.excelbanter.com/charts-charting-excel/14545-shapes-textbox-name.html)

PBN

shapes textbox name..
 
ActiveChart.Shapes.AddTextbox(msoTextOrientationHo rizontal, 31.5, 8.5, _
122.75, 42#).Select
generate a automatic name "Text box X" x= number auto number
How to get name on textbox or set name in shapes at chart

Andy Pope

Hi,

If you assign the shape to an object then you can retrieve and set
properties.

'---------------
Sub x()
Dim shpTemp As Shape

Set shpTemp =
ActiveChart.Shapes.AddTextbox(msoTextOrientationHo rizontal, _
31.5, 8.5, 122.75, 42#)
shpTemp.TextFrame.Characters.Text = shpTemp.Name

End Sub
'-----------------

PBN wrote:
ActiveChart.Shapes.AddTextbox(msoTextOrientationHo rizontal, 31.5, 8.5, _
122.75, 42#).Select
generate a automatic name "Text box X" x= number auto number
How to get name on textbox or set name in shapes at chart


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info


All times are GMT +1. The time now is 05:18 AM.

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