+ Reply to Thread
Results 1 to 6 of 6

Macros assigned Shape, colour changing code needed please

  1. #1
    Forum Contributor
    Join Date
    02-04-2014
    Location
    NSW, Australia
    MS-Off Ver
    Excel 2010
    Posts
    136

    Macros assigned Shape, colour changing code needed please

    I have made several Shapes and assigned macros to them, all is good.

    What i am curious about: is it possible to highlight or change colour of the shape on press and return to normal if another is shape is pressed? Just anything to make that particular shape stand out that it has been selected then return to normal when another shape has been selected...
    Please Login or Register  to view this content.
    That is the code so far that is attached to 1x shape...
    Last edited by lcartwright; 03-13-2014 at 08:58 PM.

  2. #2
    Forum Contributor
    Join Date
    02-24-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    317

    Re: Macros assigned Shape, colour changing code needed please

    Can't help you out with the shape color change, but this is your recorded code cleaned up.
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    02-04-2014
    Location
    NSW, Australia
    MS-Off Ver
    Excel 2010
    Posts
    136

    Re: Macros assigned Shape, colour changing code needed please

    Thank you for that (Putting "L" plates back on forehead)

  4. #4
    Forum Contributor
    Join Date
    02-24-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    317

    Re: Macros assigned Shape, colour changing code needed please

    This will change the color of the shape. You just need to insert the name of the shape between the quotes
    Please Login or Register  to view this content.
    I think you could then put the same line in the other shape code , but change the number 3 to a different number.
    Last edited by Jim885; 03-13-2014 at 10:07 PM.
    If I helped in any way, please click the star

  5. #5
    Forum Contributor
    Join Date
    02-24-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    317

    Re: Macros assigned Shape, colour changing code needed please

    Here ya go. Here's an example of two codes that will switch the colors of two shapes when the shapes are pressed.
    Please Login or Register  to view this content.
    Assign the codes to different shapes.
    Last edited by Jim885; 03-13-2014 at 11:14 PM.

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Macros assigned Shape, colour changing code needed please

    here is an example with 4 shapes. pressed button is in red.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

+ 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. Automatically bringing a Shape into a Cell Using Shape Code
    By dineshtendulkar in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 12-16-2016, 02:25 PM
  2. Finding selected shape through code
    By DeyAgahi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-08-2013, 01:14 AM
  3. [SOLVED] Insert Excel Shape at Active Cell - Final help needed Please
    By PeterF in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-29-2012, 01:27 PM
  4. Conditional formatting needed for shape colour - is programming needed?
    By Farmboyuk in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-14-2012, 07:27 AM
  5. help needed trying to find autoshape/shape name
    By funkymonkUK in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-23-2006, 11:10 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