+ Reply to Thread
Results 1 to 5 of 5

How can I turn SendKeys back on?

  1. #1
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    How can I turn SendKeys back on?

    A virus got by my virus protection and my hard drive had to be wiped clean and the OS reinstalled.
    Now SendKeys doesn't work.
    I have a sub that checks to see if I'm on my computer and stops. That way I don't have to worry about accidentally sending the code out to a client.
    Please Login or Register  to view this content.
    Now when it stops, the VBE has the line "Stop" highlighted instead of the next line in AnySub() and I have to hit [F8].
    Any suggestions on how I can get SendKeys to start working again?
    Foxguy

    Remember to mark your questions [Solved] and rate the answer(s)
    Forum Rules are Here

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,093

    Re: How can I turn SendKeys back on?

    That's what "Stop" does ... it pauses the code. It's useful for debugging and diagnosing problematic code. For example, if you put "Stop" as the first line in your Workbook_Open event handler, you can step through the code from the very beginning.

    If you don't want to pause there, remove it or comment it out. You might have put it there when you were testing.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: How can I turn SendKeys back on?

    You missed my point.
    I want to put in a conditional stop, and have it exit the sub() that has the Stop in it, so I don't have to hit the [F8] key. So I use SendKeys to do it for me, but it's not working. It worked fine before I had to reinstall the OS.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,093

    Re: How can I turn SendKeys back on?

    You missed my point
    Ah, yes, I did rather.

    Maybe it's a timing issue? Now you've re-installed the OS, is it running quicker? Maybe you could litter the MyStop code with Debug commands to see how it progresses.

    Regards, TMS

  5. #5
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: How can I turn SendKeys back on?

    Thanks;
    I'll give it a try.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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