Closed Thread
Results 1 to 3 of 3

Assign Macro to shapes and use shape.name to define action

  1. #1
    Registered User
    Join Date
    02-02-2010
    Location
    playa del carmen, mexico
    MS-Off Ver
    ms office 2007
    Posts
    52

    Assign Macro to shapes and use shape.name to define action

    I am designing a control panel type element, and have various shapes(buttons) that will be re-labelled depending on which button was clicked previously.
    For example, I have 9 buttons in top-right corner which are labelled differently depending on which user is logged in.
    Whichever button is clicked will take the textframe text and apply it to a title bar.

    The next 9 buttons will then receive different values depending on what the value of the title bar may be.

    After this, I have a section of 45 buttons, which will again be renamed depending on which one of the second-tier buttons has been clicked upon.

    And finally, whichever one of these buttons is clicked will run an action, be it open a worksheet, open word, print something etc...

    So, my question is... Is it possible to write one macro for the first-tier buttons, that will recognise which button has been clicked, rather than writing 9 macros.
    I am asking more for the benefit of the third-tier, because coding 9 macros for first-tier, and 9 macros for second-tier are not too painful, but writing 45 for the third-tier is what I would really like to avoid.

    I am coding in excel 2010 purely for ease of use and I am more comfortable with the layout, but I need the programming to run for 2003 as that is what my office uses.

    If this description has not been clear enough, I will attach a copy of the current file.
    I hope this is enough information to help

  2. #2
    Registered User
    Join Date
    02-02-2010
    Location
    playa del carmen, mexico
    MS-Off Ver
    ms office 2007
    Posts
    52

    Re: Assign Macro to shapes and use shape.name to define action

    This thread is obsolete, as I changed the title slightly

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Assign Macro to shapes and use shape.name to define action

    In future edit the original Thread & don't clutter the Forum with obsolete posts
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

Closed 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