+ Reply to Thread
Results 1 to 7 of 7

not possible to insert charts causes errors in my app

  1. #1
    Registered User
    Join Date
    07-16-2010
    Location
    U.K.
    MS-Off Ver
    Excel 2003 and Excel 2007
    Posts
    36

    not possible to insert charts causes errors in my app

    I'm working on some simple application that inserts charts based on data. Data I receive in a worksheet and graph is to be based on them. For some reason however my code (which works just fine in a test worksheet created by me) doesn't work (it breaks at the second line):

    Dim ch As ChartObject
    Set ch = ActiveSheet.ChartObjects.Add(100, 30, 400, 250)

    I'm relatively new to Excel 2007 and I've noticed that on the insert tab in the test worksheet is is possible to insert graphs by pressing a button. However on the data I receive these icons are inactive grey. Does it really matter and well how can I make it work?

    Thank you

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: not possible to insert charts causes errors in my app

    With one of those workbooks open, open the Excel Options, select the Advanced section, then under (I think) the Display section there should be an option relating to showing objects - make sure it's set to show all.
    Remember what the dormouse said
    Feed your head

  3. #3
    Registered User
    Join Date
    07-16-2010
    Location
    U.K.
    MS-Off Ver
    Excel 2003 and Excel 2007
    Posts
    36

    Re: not possible to insert charts causes errors in my app

    Quote Originally Posted by romperstomper View Post
    With one of those workbooks open, open the Excel Options, select the Advanced section, then under (I think) the Display section there should be an option relating to showing objects - make sure it's set to show all.
    there is no Advanced section in Excel 2007 - there are tabs home, insert (here are the graphs), page layout, formulas, data, review, view, add-ins.

  4. #4
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: not possible to insert charts causes errors in my app

    I guess you missed the bit where I said to open the Excel Options first? (Office button, 'Excel options...' in the bottom right corner)

  5. #5
    Registered User
    Join Date
    07-16-2010
    Location
    U.K.
    MS-Off Ver
    Excel 2003 and Excel 2007
    Posts
    36

    Re: not possible to insert charts causes errors in my app

    No I'm simply v.new to Excel 2007. I have checked and even if both worksheets (test and the one I'm working on) have the same configuration in options I'm still not able to insert any charts in the target worksheet. I thought that maybe it is somehow protected against inserting charts or something. I can edit the data itself though.

  6. #6
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: not possible to insert charts causes errors in my app

    I assume it's not a shared workbook and that you don't have multiple sheets selected?
    With the relevant workbook active, can you post a screenshot of the section in the options dialog that I mentioned?

  7. #7
    Registered User
    Join Date
    07-16-2010
    Location
    U.K.
    MS-Off Ver
    Excel 2003 and Excel 2007
    Posts
    36

    Re: not possible to insert charts causes errors in my app

    thx for your help it seems that the sheet was protected (as I thought but didn't know where to look for it in Excel 2007) Once I removed the protection from the sheet I'm now able to insert graphs.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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