+ Reply to Thread
Results 1 to 3 of 3

Running a macro by clicking on any object

  1. #1
    Registered User
    Join Date
    09-30-2013
    Location
    Nelson Bay, Australia
    MS-Off Ver
    Excel 2003
    Posts
    28

    Running a macro by clicking on any object

    Good day,

    I'm putting together a spreadsheet that allows a user to step through the process of assembling a flow chart.

    There will be "Start" (autoshape), which when clicked on, calls a userform which asks for information about the next step in the process. This will then insert an autoshape (with connecting arrows eventually) with the information that was just input by the user.

    The user then clicks on the step they've just inserted and the userform runs again. So on, and so on.

    I can't work out how to have a macro that runs if you click on ANY shape within the worksheet.

    Any assistance you can provide is appreciated.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Running a macro by clicking on any object

    Hi

    The simplest way is to create a macro for every shape.

    The macros all call a subroutine which is your main routine you can tell your routine which shape is calling if if required.

    something like:-

    Please Login or Register  to view this content.

    Please Login or Register  to view this content.
    Last edited by mehmetcik; 01-16-2014 at 08:11 PM.

  3. #3
    Registered User
    Join Date
    09-30-2013
    Location
    Nelson Bay, Australia
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: Running a macro by clicking on any object

    Can I get it so a macro is written to each shape as it is created by the user?

+ 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. Object error when running macro
    By dcgrove in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-25-2012, 03:18 PM
  2. Running a macro when clicking on a button in excel
    By mitts in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-27-2011, 12:55 PM
  3. Replies: 2
    Last Post: 03-31-2009, 03:55 PM
  4. Running a macro by clicking on a worksheet tab
    By daspook19 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-29-2006, 07:27 PM
  5. running an XLS Macro from within an XLS attached as Object
    By jaak de vuyst in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-07-2006, 04:50 AM

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