+ Reply to Thread
Results 1 to 8 of 8

Application.SendKeys issue with Num Lock

  1. #1
    Forum Contributor
    Join Date
    11-10-2009
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    549

    Application.SendKeys issue with Num Lock

    I'm using this macro to filter a list which contains words in a selected cell.
    With a long list, you can't view what's being filtered.
    For this reason, I'm going to the first row, and then using Application.SendKeys ("{DOWN}"), to make sure I can see everything.

    The issue is that every time I run the code, the Num Lock keeps turning on and off.
    Is there a way to stop?


    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: Application.SendKeys issue with Num Lock

    Save numlock status before https://www.mrexcel.com/board/thread...-state.677200/
    and return back after

  3. #3
    Forum Contributor
    Join Date
    11-10-2009
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    549

    Re: Application.SendKeys issue with Num Lock

    Thanks, I'll look into this.

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: Application.SendKeys issue with Num Lock

    If you had to use send keys would it not be END + DOWN?

    Alternative to send keys

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  5. #5
    Forum Contributor
    Join Date
    11-10-2009
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    549

    Re: Application.SendKeys issue with Num Lock

    Andy, this looks good considering the issues with SendKeys.
    But is there a way to go the the first row after the header row A, rather than the last. The reason is that if the list is longer than the page view, you can't see the first visible row.

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: Application.SendKeys issue with Num Lock

    Sorry I thought you wanted to go to the end of the list.
    Would the first unfiltered row not be immediately below A1 and therefore in view?

    The application.goto method takes an argument which you can set to TRUE which will make A1 visible

  7. #7
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: Application.SendKeys issue with Num Lock

    Or you code use this to get second visible row
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    11-10-2009
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    549

    Re: Application.SendKeys issue with Num Lock

    Actually for a long list, the first unfiltered row is typically not in view.
    For example, if I have a list of 1000 entries and only 3 of those still remain after the filter, then most of the time, I don't see anything. It depends on where in the sheet I am. This may be because I have the freeze pane setting on.

    EDIT: After viewing the above post, it works now. Thanks for resolving this.
    Last edited by Un-Do Re-Do; 11-13-2020 at 04:57 AM.

+ 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] Application.SendKeys F1
    By brentjohn in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-15-2018, 12:18 PM
  2. Application.Sendkeys for Mac Excel
    By nalgene5622 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-02-2012, 09:42 PM
  3. Application.sendkeys help
    By viruzman in forum Excel General
    Replies: 1
    Last Post: 03-26-2008, 10:13 PM
  4. SendKeys to open application
    By Arne Hegefors in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-15-2006, 04:37 AM
  5. Close an application with sendkeys
    By ina in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-16-2006, 03:20 AM
  6. The application SendKeys
    By Jim333 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-17-2005, 12:44 AM
  7. SendKeys and Application.ScreenUpdating
    By Michael Malinsky in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-23-2005, 07:06 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