+ Reply to Thread
Results 1 to 6 of 6

How to make a clickable image on useform respond to hitting the Enter key

  1. #1
    Forum Contributor
    Join Date
    05-19-2012
    Location
    houston
    MS-Off Ver
    excel 2013
    Posts
    103

    How to make a clickable image on useform respond to hitting the Enter key

    Hi...

    I know how to make a command button in a userform click when pressing the enter key, however I'm using an image instead of command button for the button to run a macro.

    Is it possible to make my Image1 in the userform be clicked when pressing the enter key?

    Please Login or Register  to view this content.

  2. #2
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,907

    Re: How to make a clickable image on useform respond to hitting the Enter key

    Why do you need an image control rather than a button (which can have a picture on it)?
    Rory

  3. #3
    Forum Contributor
    Join Date
    05-19-2012
    Location
    houston
    MS-Off Ver
    excel 2013
    Posts
    103

    Re: How to make a clickable image on useform respond to hitting the Enter key

    Design aspects. Using images in the userform for buttons allows for a cohesive look with shape buttons in the rest of the workbook.

  4. #4
    Registered User
    Join Date
    01-12-2016
    Location
    Norway
    MS-Off Ver
    2016
    Posts
    76

    Re: How to make a clickable image on useform respond to hitting the Enter key

    You could use a transparent label over it.

  5. #5
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,907

    Re: How to make a clickable image on useform respond to hitting the Enter key

    You could use a button underneath the image with its Default property set to True, and have both simply call the same code.

  6. #6
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,480

    Re: How to make a clickable image on useform respond to hitting the Enter key

    You can use the mouseDown event in the image.

    Please Login or Register  to view this content.

+ 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. [SOLVED] enter 4 colums of data in a row then shift after hitting enter
    By tintin007 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-01-2014, 04:57 PM
  2. Replies: 2
    Last Post: 07-02-2013, 03:36 PM
  3. Replies: 5
    Last Post: 12-06-2010, 04:39 PM
  4. Clickable Background Image
    By pradeepchandra in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-06-2010, 06:13 AM
  5. Hitting Enter after Tab
    By tmix in forum Excel General
    Replies: 3
    Last Post: 09-17-2009, 04:19 PM
  6. Hitting enter
    By smilegirl in forum Excel General
    Replies: 1
    Last Post: 10-17-2008, 05:08 PM
  7. Replies: 2
    Last Post: 10-20-2005, 05:05 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