+ Reply to Thread
Results 1 to 5 of 5

Macro Button Instead of Pressing Enter

  1. #1
    Registered User
    Join Date
    09-17-2019
    Location
    Germany
    MS-Off Ver
    2010
    Posts
    11

    Question Macro Button Instead of Pressing Enter

    Good Morning,

    I have a text search Cell In H7 that works great. I type in my criteria
    and press enter, and it highlights what Im looking for.

    I would like to have a grey button next to it (CELL I7)that emulates me pressing enter key when i click the mouse on it.

    Can this be done?

    Thankyou

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Macro Button Instead of Pressing Enter

    If you type something in a cell, then click anywhere on the sheet including on a button that does nothing, that would enter the text in the cell.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Macro Button Instead of Pressing Enter

    I agree with Alpha. You would need to press enter to have the data put into the cell, I dont see how how having a button to click would speed anything up?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,408

    Re: Macro Button Instead of Pressing Enter

    Quote Originally Posted by FDibbins View Post
    I don't see how how having a button to click would speed anything up?
    It wouldn't... as a matter of fact, it would slow things up. The user is typing a value in the cell so his hands are on the keyboard. Instead of reaching over with his/her pinky and pressing the Enter Key, the OP is asking the user to take his/her hand off of the keyboard, grab the mouse, slide the cursor until it is over the button and then press the left button on the mouse in order to click the button on the screen. And then if the user is going to input more data, he/she has to let go of the mouse and put his/her hand back on the keyboard where it originally was.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Macro Button Instead of Pressing Enter

    Rick, those where my thoughts too, I just didnt feel like doing all that typing LOL
    (also, had the thought of a user being a left-handed typist and right-handed mousist)

+ 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. Activate macro while pressing ENTER Key
    By ramzi_007 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-24-2016, 08:13 AM
  2. No Cell Movement after Pressing Enter with this macro I'm using on a protected sheet
    By Janet_824 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-25-2016, 02:59 PM
  3. [SOLVED] Enter the name of the worksheet (tab) in Textbox and after pressing the button to go to Sh
    By marreco in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-10-2012, 10:15 PM
  4. Trigger macro when entering text in a cell, without pressing enter
    By DGagnon in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-06-2012, 05:53 PM
  5. Run Macro by Pressing Enter Key
    By styre in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-02-2009, 03:49 PM
  6. execute macro after pressing enter
    By ledzepe in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-03-2008, 05:44 PM
  7. Command button auto select after pressing Enter
    By Bafa in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-21-2006, 03:05 AM

Tags for this Thread

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