+ Reply to Thread
Results 1 to 5 of 5

Error when using VBA to create stacked column chart. Error : Object has no title

  1. #1
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Error when using VBA to create stacked column chart. Error : Object has no title

    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.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Error when using VBA to create stacked column chart. Error : Object has no title

    Maybe change your code to
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Re: Error when using VBA to create stacked column chart. Error : Object has no title

    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?

  4. #4
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Error when using VBA to create stacked column chart. Error : Object has no title

    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

  5. #5
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,922

    Re: Error when using VBA to create stacked column chart. Error : Object has no title

    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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Mac throwing error - Runtime Error 429 - ActiveX Component Can't Create Object
    By harman83 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 11-28-2018, 11:04 PM
  2. [SOLVED] How to create a 3D stacked column chart
    By JimDandy in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 02-23-2017, 01:41 PM
  3. [SOLVED] How to create a stock column chart with error bars?? (Both gender together)
    By Orongo in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 01-04-2013, 10:56 AM
  4. Replies: 5
    Last Post: 07-16-2011, 08:07 AM
  5. How to create a stacked column chart
    By john9210 in forum Excel General
    Replies: 1
    Last Post: 10-19-2009, 05:01 AM
  6. How do I create a chart that uses both columns and stacked column.
    By buske in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 01-25-2006, 12:10 PM
  7. [SOLVED] To create a stacked column chart and group the stacked bars togeth
    By Jacqueline in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 02-18-2005, 10:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1