+ Reply to Thread
Results 1 to 3 of 3

macro to graph values

  1. #1
    Registered User
    Join Date
    01-10-2008
    Posts
    11

    macro to graph values

    Hi all,

    I need assistance troubleshooting my graphing macro.

    The specific message that I am getting is a message box stating:
    In the box title bar: "Ole Dispatch Exception in Worksheet Open Event Handler"
    In the body: "Activate method of Window class failed"

    My macro takes data from worksheet X and places the graph in worksheet X.

    The relevant code looks like:
    Please Login or Register  to view this content.
    After throwing the error the macro execution continues to the end.

    I'm not sure what the error is telling me as I'm not explicitly calling activate where the error is being thrown. I have tried moving code around, eg. putting the Location() call at the bottom of the sub-routine but am still getting the error.

    Any help is appreciated.

    Thanks!

    Thanks!

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello clintonf,

    There are 2 type of Charts: Chart Objects and Chart Sheets. you are mixing the 2 in your code. My assumption is you want to create an embedded chart on a particular sheet and then move it to another worksheet. The code below will create an embedded Bar Stacked chart on "Sheet1" and move it to "Sheet2". The source range is on "Sheet1", A1:A10.

    Create and Move Embedded Chart
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    01-10-2008
    Posts
    11
    Hi Leith,

    Your suggestion worked perfectly.

    Thanks very much for your help!

+ 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