+ Reply to Thread
Results 1 to 2 of 2

How to activate the chart/object next to a button?

  1. #1
    Registered User
    Join Date
    08-12-2007
    Location
    United Sates
    MS-Off Ver
    Office 365, PC
    Posts
    29

    How to activate the chart/object next to a button?

    I have a dashboard with multiple pivot charts. A macro controls chart formatting based on numerous criteria. The dataset is huge and frequently changes, so I want to update manually, as needed, on a per-chart basis rather than running on Worksheet_Calculate/_PivotTableUpdate/_PivotTableAfterValueChange/etc. (which would make everything intolerably slow).

    The current macro iterates over ActiveChart, so I have to manually activate each chart before clicking the button. My question is: How can I activate the chart above/below/adjacent to the clicked button? I realize that I can make a separate macro for each chart that first activates the chart and then calls the main macro, but I'd much rather just have one script that can figure out the chart of interest based on the button location so it dynamically adapts to new charts/moved charts/changing chart names.

    Please Login or Register  to view this content.
    (Also, if there's a better option than using the ApplicationCaller's .Address property, please say so. It was just the most straightforward thing that popped to mind.)
    Attached Images Attached Images

  2. #2
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,224

    Re: How to activate the chart/object next to a button?

    Please Login or Register  to view this content.
    The top edge of the button does not have to be exactly on the bottom edge of the chart. In this code, you can have button location inaccuracy up to 20% of the button height.

    Artik

+ 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. How to activate Sound Object in Userform, Buttons/Macros
    By X myth in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-09-2019, 01:51 PM
  2. moving chart object and keep object ability for chart events?
    By tdrose01 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-12-2014, 06:43 AM
  3. [SOLVED] Activate chart on worksheet, without knowing chart name or index number
    By d.sanchez in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 10-18-2013, 12:51 PM
  4. Activate method of chart object failed
    By nigelog in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-30-2008, 06:37 AM
  5. Replies: 2
    Last Post: 08-07-2006, 09:45 PM
  6. Activate web link via image object
    By MIKESX in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-01-2006, 03:25 AM
  7. Option button object proeprties or object not found in vba
    By Pete Straman S via OfficeKB.com in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-31-2005, 01:05 PM

Tags for this Thread

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