+ Reply to Thread
Results 1 to 4 of 4

SendKeys not working for displaying filter dropdown list in excel 2007

  1. #1
    Registered User
    Join Date
    08-02-2012
    Location
    Singapore, Hong Kong
    MS-Off Ver
    Excel 2003, Excel 2007
    Posts
    2

    SendKeys not working for displaying filter dropdown list in excel 2007

    Hi all, I'm new to the forum and I've checked out some old post but I still cannot find a solution.
    Here's the problem.

    Assume the autofilter is on on row1.
    I have a macro like this:
    Please Login or Register  to view this content.
    It finally shows up the dropdown list of the autofilter of cell A1 at the end of the vba script.
    It was working perfectly with excel 2003 in my old winxp.
    However, when I move to excel 2007 in win 7, the dropdown list only blinks but keep closed again immediately.
    Is there anyway to show the autofilter dropdown list at the end of the script in excel 2007 under win 7?
    Thank you!!!
    Last edited by kwhhyk; 02-28-2014 at 08:12 AM.

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: SendKeys not working for displaying filter dropdown list in office 2007

    I have problems using SendKeys in Windows 7 also, with applications that worked in Vista or XP. When I turn UAC off (not recommended) SendKeys works for me in Windows 7.

    To enable and disable UAC in Windows 7 see:
    http://www.howtogeek.com/howto/windo...windows-vista/

    Lewis

  3. #3
    Registered User
    Join Date
    08-02-2012
    Location
    Singapore, Hong Kong
    MS-Off Ver
    Excel 2003, Excel 2007
    Posts
    2

    Re: SendKeys not working for displaying filter dropdown list in office 2007

    Thank you Lewis.

    My case is that my UAC is already set to "never notify". So it's not the reason why it doesn't work, i think.
    By the way, the macro works also for other normal cells to display a dropdown of data of previous rows, same as I manually press Alt+down.
    I can also manually press Alt+down to show the dropdown filter. However, it just blinks once if I use macro on filter cell.

    Quote Originally Posted by LJMetzger View Post
    I have problems using SendKeys in Windows 7 also, with applications that worked in Vista or XP. When I turn UAC off (not recommended) SendKeys works for me in Windows 7.

    To enable and disable UAC in Windows 7 see:
    http://www.howtogeek.com/howto/windo...windows-vista/

    Lewis

  4. #4
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: SendKeys not working for displaying filter dropdown list in excel 2007

    I only occasionally have access to Windows 7, and use Excel 2003 almost exclusively. I've been researching the problem for my own use, and found the following links which may be useful. I have not tried any of the techniques in the links yet.

    About halfway down in the following link there is a code snippet that uses 'keybd_event ()':
    http://social.msdn.microsoft.com/For...elopmentissues

    The following discusses 'keybd_event ()':
    http://www.excelforum.com/excel-prog...ybd_event.html

    The following uses 'PostMessage()':
    http://fracta.net/fracta/index.php/f...ll-postmessage

    The following may be slightly off topic, as it traps keystrokes and attempts to echo the results:
    http://stackoverflow.com/questions/1...editing-a-cell

    I hope these help.

    Lewis

+ 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. Drop down list whit tick (like filter in 2007 office)
    By arn0ldas in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-13-2014, 08:00 AM
  2. Dropdown calandar in Office 2007.
    By kishoremcp in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-05-2012, 03:11 PM
  3. Replies: 1
    Last Post: 09-13-2011, 05:51 PM
  4. macro built with Office 2003 not working on Office 2007
    By pako87 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-02-2009, 08:12 AM
  5. Replies: 0
    Last Post: 11-27-2007, 07:17 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