+ Reply to Thread
Results 1 to 5 of 5

Macro won't run if text is being edited in cell

  1. #1
    Registered User
    Join Date
    06-07-2013
    Location
    WV USA
    MS-Off Ver
    Excel 2010
    Posts
    16

    Macro won't run if text is being edited in cell

    I have a log book that gets modified through out the day, and an auto run macro that runs at specific times to save the data to a database type sheet, and clear the form for the next shift. some of the operators are double clicking in the cell so they can type their comments. If they do not hit tab or enter when they are done, and the save time comes, the macro is not running, and I'm not collecting the data that I need. Is there a way to force the macro to run, or to force a tab/enter after 3 minutes of inactivity?

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,178

    Re: Macro won't run if text is being edited in cell

    You could set a timer after the sheet opens....
    Run a procedure to save, then your other app can run.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-07-2013
    Location
    WV USA
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Macro won't run if text is being edited in cell

    This is a similar code to the one that is running my database and clear macro the problem is this sheet stays open all the time, and if the operator leaves the cursor in the cell the macro will not run .ontime

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Macro won't run if text is being edited in cell

    Code execution is suspended when Excel is in edit mode.
    If posting code please use code tags, see here.

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

    Re: Macro won't run if text is being edited in cell

    A way around it could be to not allow the cell edit mode

    Put this in the ThisWorkbook code module.
    Please Login or Register  to view this content.
    Or to take it one step farther; cancel cell edit mode and then call a userform to allow the user edit the cell entry and have the userform timeout.

    Please Login or Register  to view this content.
    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.

+ 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] Putting text in a cell on the same row as an edited cell
    By London257 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-19-2012, 02:29 AM
  2. Replies: 11
    Last Post: 02-27-2012, 06:54 PM
  3. Log username edited cell macro codes
    By akou in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-27-2009, 10:43 AM
  4. Running a macro automatically when a cell is edited
    By mattsgr1 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-10-2007, 06:41 AM
  5. text is deleted when cell is edited
    By GRIFFO in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-23-2005, 11:05 PM

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