Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA code to change text in exel charts

Status
Not open for further replies.

daddypost

Technical User
Oct 21, 2004
98
US
I've inherited a workbook that has 1 data page, and 15+ charts. The text on each of the charts has been manually changed to reflect the month's data that is in the charts. I'm sure there is any easy way to do this through VBA, but I'm not sure of the syntax. My initial thought is just to do a find/replace in the workbook and have it update to whatever I need it to be (either date(), date()-1...whatever) but I have a feeling I will also have to change the text in individual charts as well. I will need this to update update whenever the spreadsheet is open, but I don't want to have the message box that asks whether or not I want to update the data.
If anyone has any suggestions they would be appreciaed. Thank you.
 



Hi.

..."The text on each of the charts has been manually changed to reflect the month's data that is in the charts..."

What Chart Element is the date in? It might be as simple as ....

1. Put the date for each chart in a cell

2. Select the chart element that contains the date

3. In the FORMULA BAR, hit = and then click on the cell containing the date and hit ENTER.


"...workbook that has 1 data page, and 15+ charts..."

Something to refect on: I do charts regularly, that have a single data source. I make ONE CHART, with one or more ComboBoxes for selecting criteria values. It sure saves maintenance effort when something like this happens.

Realize that it can be as simple as filtering the data source by the criteria value. The chart options can be configured to display onle VISIBLE cells.

Skip,

[glasses] [red][/red]
[tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top