![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
Mr. Excel,
I am creating multiple charts in a macro using a for loop, thanks to your help yesterday. How can I let the title be equal to the value of a cell (or range of cells)? Basically, I need to set the value of ActiveChart.ChartTitle.Characters.Text to the appropriate cell value (being looped through). Also, after creating the chart, I export it, but when I try to delete it after the export (ActiveChart.Delete) it fails. What's the solution? Thanks, JAS |
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Bogota, Colombia
Posts: 11,927
|
For the first one:
ActiveChart.HasTitle = True ActiveChart.ChartTitle.Text = Range("A1") for the second one, try with: ActiveSheet.ChartObjects(1).Delete or ActiveSheet.ChartObjects(ActiveSheet.ChartObjects.Count).Delete |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|