+ Reply to Thread
Results 1 to 13 of 13

Need To Simulate Pressing Enter Key On A Cell Every Second

  1. #1
    Forum Contributor
    Join Date
    02-09-2016
    Location
    West Midlands
    MS-Off Ver
    2016
    Posts
    224

    Need To Simulate Pressing Enter Key On A Cell Every Second

    Hi,

    Its a very long story with lots of Macros been called and i'm using a data feed into Excel.

    Because its a data Feed Excel doesn't run my "Private Sub Worksheet_Change(ByVal Target As Range)"


    Is there any way to replicated a cell been constantly pressed every second? Either as Excel Formula or VBA?

    Really appreciate your help guys!

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

    Re: Need To Simulate Pressing Enter Key On A Cell Every Second

    Possibly worksheet_calculate event could help in this situation?

  3. #3
    Forum Contributor
    Join Date
    02-09-2016
    Location
    West Midlands
    MS-Off Ver
    2016
    Posts
    224

    Re: Need To Simulate Pressing Enter Key On A Cell Every Second

    Hi Dave!

    Could you give me an example of how could i use that to get "Cell C1" in "Sheet 2" to make it Auto press enter every second?

    Many Thanks

  4. #4
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Need To Simulate Pressing Enter Key On A Cell Every Second

    Could you give me an example
    Add a formula whose value will change ONCE every time data is fed into the sheet

    Place code in SHEET module
    Please Login or Register  to view this content.
    The above macro will trigger every time
    Use that trigger instead of Worksheet_Change
    - be careful not to end up with too many triggers
    Last edited by kev_; 02-27-2018 at 12:44 PM.
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Need To Simulate Pressing Enter Key On A Cell Every Second

    You're using a DDE link?
    Entia non sunt multiplicanda sine necessitate

  6. #6
    Forum Contributor
    Join Date
    07-06-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2016
    Posts
    192

    Re: Need To Simulate Pressing Enter Key On A Cell Every Second

    maybe can try this. Add a module.
    Please Login or Register  to view this content.
    Just change the timevalue to 1 second if you want. Take note once you run it it will not stop until you break/reset the macro. alternatively you can create a stop button or a condition to have it stop.

  7. #7
    Forum Contributor
    Join Date
    02-09-2016
    Location
    West Midlands
    MS-Off Ver
    2016
    Posts
    224

    Re: Need To Simulate Pressing Enter Key On A Cell Every Second

    Thanks Guys! Really appreciate your time and help!

    Unfortunately because i'm not that advanced with VBA and im using a data feed rather than values that are entered with return its rather out of my league.

    I think i had too many Macros to be called automatically and also i believe some were not always active.

    I have stripped down my Work Book to basically the 2 macros i need to run under different criteria. Because it maybe different than original post i will re-post as a new topic to save confusion.

    Many Thanks again!

  8. #8
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Need To Simulate Pressing Enter Key On A Cell Every Second

    Per shg's question, if it is a DDE link, you might use the Workbook's SetLinkOnData method to assign a macro to run when the link is updated.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  9. #9
    Forum Contributor
    Join Date
    02-09-2016
    Location
    West Midlands
    MS-Off Ver
    2016
    Posts
    224

    Re: Need To Simulate Pressing Enter Key On A Cell Every Second

    Hi xlnitwit,

    It a API feed from BetFair Exchange. I'm desperately trying to find out if this is a DDE link. I actually believe it is! (not 100% sure).

    I'm really not advanced with VBA. Ill research your suggested "Workbook's SetLinkOnData method" now but could you give me an example of how i could use this to run 2 macros been triggered from the data feed.

    1) first macro to trigger when Cell B1 value changes

    2) second macro to trigger when Cell F4 value = a certain value i specify

    Many thanks for your help!

  10. #10
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Need To Simulate Pressing Enter Key On A Cell Every Second

    You may only assign one macro per link so if you have the same link for both, you would require a macro that checks each cell's value. The syntax is
    Please Login or Register  to view this content.

  11. #11
    Forum Contributor
    Join Date
    02-09-2016
    Location
    West Midlands
    MS-Off Ver
    2016
    Posts
    224

    Re: Need To Simulate Pressing Enter Key On A Cell Every Second

    Thanks for getting back to me! May i ask how i would be able to find out the "DDE_LINK_NAME"?

  12. #12
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Need To Simulate Pressing Enter Key On A Cell Every Second

    What is the formula in the cells?

  13. #13
    Forum Contributor
    Join Date
    02-09-2016
    Location
    West Midlands
    MS-Off Ver
    2016
    Posts
    224

    Re: Need To Simulate Pressing Enter Key On A Cell Every Second

    Sorry xlnitwit as i say i'm really not advanced enough to understand. The Cells are automatically updated via a data feed and my macros that need to be triggered are 2 separate VBA modules.

    1) when Cell B1's value changes

    2) when Cell F4 value (Timer CountDown) ="00:00:05" or equivalent to "0.0000694444444444553" if cells format is set to general.

    I have created a new post that explains what i'm trying to achieve. I thought it best to start a new post as it might need a different approach. I dont think im allowed to post a link to my new Post, but its titled "Running condition based Macros when working with a live data feed"

    under the Excel Programming / VBA / Macro section of the forum.

+ 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 simulate the ENTER KEY being pressed (ie trigger Enter Key event)
    By michellepace in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-05-2017, 09:41 AM
  2. Pressing enter and selected cell changes randomly
    By Big_Kev in forum Excel General
    Replies: 3
    Last Post: 09-12-2017, 10:09 AM
  3. Reselect cell after pressing enter
    By randell.graybill in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-19-2010, 10:38 PM
  4. Alt + Enter when pressing enter in cell?
    By Stiff in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-20-2009, 05:31 AM
  5. Auto Jumping to next cell without pressing enter
    By Steve Brown in forum Excel General
    Replies: 1
    Last Post: 01-21-2008, 02:47 PM
  6. Active Cell after pressing the Enter Key
    By RealNewbie in forum Excel General
    Replies: 2
    Last Post: 10-17-2007, 09:56 PM
  7. Replies: 1
    Last Post: 05-31-2006, 12:10 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