Please find the enclosed macro. It trys to create a stacked bar chart but for some reason it gives a run time error of "The object has no title".
I have tried all kinds of things to fix this............just not sure what i am doing wrong.
Please find the enclosed macro. It trys to create a stacked bar chart but for some reason it gives a run time error of "The object has no title".
I have tried all kinds of things to fix this............just not sure what i am doing wrong.
Maybe change your code to
Please Login or Register to view this content.
thanks.
But it looks like the main difference is you used ".AddChart2" where i used ".AddChart"
Any idea why this made the difference? Does ".AddCHart" only work for certain charts?
AddChart and AddChart2 are essentially the same, depending on your Office version. If you visit the documentation, I think Microsoft remove AddChart method and went with AddChart2.
https://docs.microsoft.com/en-us/off...apes.addchart2
AddChart2 won't work in 2007 if that's what you're actually using. You need to make sure the chart actually has a title before you try and set its text:
Please Login or Register to view this content.
Rory
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks