Results 1 to 6 of 6

How to write VBA code that waits for the user to select a chart?

Threaded View

  1. #1
    Registered User
    Join Date
    08-06-2013
    Location
    the boonies
    MS-Off Ver
    Excel 2007
    Posts
    46

    Cool How to write VBA code that waits for the user to select a chart?

    I wrote some code that currently only works if a chart is already selected/activated before running the code.
    Could you share a VBA example that waits for the user to activate a chart (or a shape object) before proceeding?
    Is this an event-handling issue?

    I tried assigning my subroutine to a rectangle shape-object on the same worksheet as the chart (poor man's button), but unfortunately this shape becomes the active object (stealing "active" status from the chart), so when it calls the sub, the sub just exits with an error. Would assigning this sub to a User Form button have the same outcome? I haven't experimented with making my own GUIs yet.

    Thanks,
    Geophysicist
    Attached Files Attached Files
    Last edited by geophysicist; 08-22-2013 at 08:15 AM. Reason: attaching spreadsheet

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 06-11-2013, 05:14 PM
  2. How do i code a VBA to ask the user to select which file to use
    By kenadams378 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 05-16-2012, 07:26 PM
  3. Can't write code to find last data row in excel user form
    By stevegrobertson in forum Excel General
    Replies: 8
    Last Post: 02-24-2012, 10:16 PM
  4. Code to prevent user to Select COLUMNS but allow to select ROWS
    By tengrosita in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-05-2011, 03:46 AM
  5. Create chart where user select part of data
    By Endorphin in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 10-23-2008, 06:50 AM

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