Results 1 to 3 of 3
  1. #1

    Post HELP! vba excel chart generation


    Mga bro!

    I am currently working on a large workbook with several sheets and lots of charts in every sheets. My problem it when i execute this code:

    ActiveChart.Location Where:=xlLocationAsObject, Name:=worksheet_name & " (Chart)"

    vba gives off an error 5 "Invalid procedure call or argument". I don't understand how this could be when the same sequence of code works fine with the other sheets except to one. I thought having too many charts may had triggerd this error so i tried deleting all other charts and try the codes again, but still the same error. I tried looking into the DATA TABLE and i couldnt find anything anusual about it. Exactly the same design as the other sheets still. The code above is under a do-while loop (if you should know). My gues is that the error may be somewhere else and not the code above but how come it works fine with other sheets?

    Pls do help mga bro... im using the MS office 2003 version and later to be move to MS Office 2007.

  2. #2
    up lang PO.... urgent man gud mga bro... hehehehe

  3. #3
    ActiveSheet.ChartObjects("Chart 3").Activate
    ActiveChart.ChartArea.Select
    ActiveChart.SetSourceData Source:=Sheets("Sheet1").Range(Cells(6, 1), Cells(9, aCol)), PlotBy:= _
    xlRows


    Try this sample code. I hope it could be help.

  4.    Advertisement

Similar Threads

 
  1. Replies: 5
    Last Post: 06-21-2012, 06:43 PM
  2. help basic excel.
    By j.alob in forum Windows Software
    Replies: 5
    Last Post: 09-09-2010, 06:11 AM
  3. HELP: Microsoft Excel
    By lallele in forum Software & Games (Old)
    Replies: 7
    Last Post: 10-05-2008, 11:31 AM
  4. HELP: Microsoft Excel
    By lallele in forum Computer Hardware
    Replies: 2
    Last Post: 10-04-2008, 07:17 PM
  5. VBA Excel, I need your expertise!
    By schatz793 in forum Programming
    Replies: 8
    Last Post: 08-05-2006, 03:23 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top