Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Addressing a text box in a chart

Hello,

I want to “tag” different areas of a chart in Sheet1 with clarifyin
text using VBA-code. Therefore I have created a textbox (Text Box 1
with the tool in the “drawing”-toolbar. This textbox is positione
within the area of chart1 that sits in sheet1 in the open workbook. Ho
do I address the text in Text Box 1 and change it to a string defined i
VBA? Would be great if someone could help me with this!

Thanks in advance!

//Emi

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,489
Default Addressing a text box in a chart

Hi Emil,

Something like this, alter indexes as needed.

activesheet.chartobjects(1).chart. _
shapes(1).textframe.characters.text = "HELLO"

Or another way would be to link the textbox to a cell, select the
textbox and then enter a cell reference into the formula bar (include =
and sheetname). Then you can alter the cell and the textbox will update
automatically.

Cheers
Andy

Emil < wrote:

Hello,

I want to “tag” different areas of a chart in Sheet1 with clarifying
text using VBA-code. Therefore I have created a textbox (Text Box 1)
with the tool in the “drawing”-toolbar. This textbox is positioned
within the area of chart1 that sits in sheet1 in the open workbook. How
do I address the text in Text Box 1 and change it to a string defined in
VBA? Would be great if someone could help me with this!

Thanks in advance!

//Emil


---
Message posted from http://www.ExcelForum.com/


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default Addressing a text box in a chart

Try

Sub TextInBox()
ActiveSheet.Shapes("Text Box 1").Select
Selection.Characters.Text = "This is text"
ActiveCell.Select
End Sub

regards'Don

"Emil " wrote in message
...
Hello,

I want to "tag" different areas of a chart in Sheet1 with clarifying
text using VBA-code. Therefore I have created a textbox (Text Box 1)
with the tool in the "drawing"-toolbar. This textbox is positioned
within the area of chart1 that sits in sheet1 in the open workbook. How
do I address the text in Text Box 1 and change it to a string defined in
VBA? Would be great if someone could help me with this!

Thanks in advance!

//Emil


---
Message posted from http://www.ExcelForum.com/



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Addressing a text box in a chart

Thanks Don and Andy, it works great!
Now my users might understand what this chart is all about...

//Emi

--
Message posted from http://www.ExcelForum.com

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Addressing in VBA Richard Excel Discussion (Misc queries) 1 January 23rd 08 01:40 AM
VBA and range addressing C Brandt Excel Discussion (Misc queries) 3 July 31st 07 04:38 PM
Cell addressing Mike Excel Worksheet Functions 0 November 30th 06 02:51 PM
Cell addressing Mike Excel Worksheet Functions 0 November 30th 06 09:02 AM
Relative Addressing Bill Martin -- (Remove NOSPAM from address) Excel Discussion (Misc queries) 4 February 20th 05 04:43 AM


All times are GMT +1. The time now is 12:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"