+ Reply to Thread
Results 1 to 3 of 3

Why doesn't Escape work while Sleep is running? (API)

  1. #1
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Question Why doesn't Escape work while Sleep is running? (API)

    Why doesn't Cancel (Escape key) work while Sleep API (kernel32.dll) is running?

    I was looking at making a minor change to a solved thread (see http://www.excelforum.com/excel-prog...user-form.html )

    I would like the user to be able to exit the form by pressing Escape. I altered the start and end of the sub to below but it didn't work:

    START:
    Please Login or Register  to view this content.

    END:
    Please Login or Register  to view this content.

    Why doesn't this work?
    *******************************************************

    HELP WANTED! (Links to Forum threads)
    Trying to create reusable code for Custom Events at Workbook (not Application) level

    *******************************************************

  2. #2
    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: Why doesn't Escape work while Sleep is running? (API)

    http://www.cpearson.com/excel/WaitFunctions.aspx
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Re: Why doesn't Escape work while Sleep is running? (API)

    So that's why.

    I'm forever learning something new.

+ 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] Macro work in personal workbook, doesn't work in other workbooks
    By Centexcel in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-30-2013, 11:47 AM
  2. Can't get no sleep...
    By hatrickx in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-15-2013, 07:42 AM
  3. [SOLVED] Macro Doesn't Work Through Button, Does Work Through Developer ->Macros Option
    By freybe06 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-27-2013, 11:55 AM
  4. Loop in my macro doesn't seem to be running; however, it compiles fine...
    By Goobies in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-01-2006, 09:00 PM
  5. Macro doesn't stop running
    By Nogi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-14-2005, 02:43 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