xamination
New Member
- Joined
- Jul 8, 2011
- Messages
- 5
I am writing a program which takes data from multiple charts and combines them into one singular chart. Everything seems to be working fine, until I get to these last two lines
ActiveChart.HasTitle = True
ActiveChart.ChartTitle.Text = chartName
Now, if I run the macro as is, I get an error message telling me "The object has no title." Hovering over ActiveChart.HasTitle says it is set at false. HOWEVER, if I put a stop in a few lines before, and step through these lines, everything works fine, no problem. I even put a do until loop around "activechart.hastitle = true" to make sure it was setting it to true.
It seems that if I run through it as normal it will throw an error. But if I step through it it won't. Whats causing this error, or what would be a work around at least?
Thanks in advance
ActiveChart.HasTitle = True
ActiveChart.ChartTitle.Text = chartName
Now, if I run the macro as is, I get an error message telling me "The object has no title." Hovering over ActiveChart.HasTitle says it is set at false. HOWEVER, if I put a stop in a few lines before, and step through these lines, everything works fine, no problem. I even put a do until loop around "activechart.hastitle = true" to make sure it was setting it to true.
It seems that if I run through it as normal it will throw an error. But if I step through it it won't. Whats causing this error, or what would be a work around at least?
Thanks in advance