+ Reply to Thread
Results 1 to 5 of 5

Make a (picture) button Active

  1. #1
    Registered User
    Join Date
    08-10-2016
    Location
    US
    MS-Off Ver
    365
    Posts
    70

    Make a (picture) button Active

    See attached picture.

    Is there a way to insert this picture as a button in Excel and assign it a Macro?

    Is there a way to make the button look like it is being pressed?

    THank you,
    Attached Images Attached Images

  2. #2
    Valued Forum Contributor Neil_'s Avatar
    Join Date
    04-19-2013
    Location
    Yorkshire
    MS-Off Ver
    Office 365 Enterprise E3 2013 / 2016
    Posts
    479

    Re: Make a (picture) button Active

    Yes, there is.
    Attached Files Attached Files
    Frob first, tweak later

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    23,950

    Re: Make a (picture) button Active

    Sorry for off-topic interjection:

    Although there is no official rule regarding this behavior, we request that wherever possible both the question AND the answer be provided in substantive detail here within the thread. An attached workbook is an excellent aid for posing a question and offering a solution, but solely doing that with no in thread explanation makes it difficult for researchers to understand or consider the Q & A of this thread without downloading what may be a pointless doc to them, if they can do that at all. Doing that also hides the content from search engines so others may never benefit from this.

    I'm sure you understand, and we look forward to seeing you post your formulas/macros in your posts for the searching benefit of all.

    Thanks again for all your hard work here!
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Registered User
    Join Date
    08-10-2016
    Location
    US
    MS-Off Ver
    365
    Posts
    70

    Re: Make a (picture) button Active

    How did you do that?

  5. #5
    Valued Forum Contributor Neil_'s Avatar
    Join Date
    04-19-2013
    Location
    Yorkshire
    MS-Off Ver
    Office 365 Enterprise E3 2013 / 2016
    Posts
    479

    Re: Make a (picture) button Active

    there are three buttons. Two are hidden. The button that does the work gets the picture from the down button at the start of the macro and the picture from the up button at the end. All three buttons are grouped together on your sheet with the functioning one on top.
    Here's the code
    Please Login or Register  to view this content.
    I made the button looked 'pressed' by using an advanced technique in MsPaint by pulling the top of the selection down and squashing the whole image.

    It's all a bit of a hack really. Ideally the picture would change with the mouse down and mouse up events, but you can 'slide' off the button without generating a mouse up, leaving the button 'pressed'. There are ways around this using windows API functions to get the mouse move for the sheet, but it's too much bother for the trivial matter of changing a piccy.
    Last edited by Neil_; 10-12-2016 at 12:17 PM.

+ 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 make macro button to print page that has the active cell only?
    By meonly123 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-22-2015, 11:05 AM
  2. [SOLVED] Insert Picture in cell, click commanbutton to rename picture, lock cell and remove button
    By thecdnmole in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-28-2014, 10:05 PM
  3. [SOLVED] Determining which Active x button was pressed?? I have two Active X buttons that operate
    By Spreadlover in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-28-2013, 09:40 AM
  4. how to make command button to insert picture
    By sspreyer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-08-2013, 04:45 AM
  5. how to make command button insert picture in range of cells
    By sspreyer in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-08-2013, 01:51 AM
  6. Hide a picture button placed in all sheets using a option button (form control)
    By lagaranch in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-26-2012, 10:33 AM
  7. Tab sequence from cell to active x button and then to a command button
    By 2funny4words in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-07-2009, 02:27 PM

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