Results 1 to 2 of 2

Thread: [RESOLVED] Excel: Listbox events false trigger

  1. #1

    Thread Starter
    Fanatic Member VBAhack's Avatar
    Join Date
    Dec 2004
    Location
    Sector 000
    Posts
    617

    Resolved [RESOLVED] Excel: Listbox events false trigger

    I'm using the cell selected event to display a modeless listbox (Userform) for the user to select an item to fill the cell. Mouse clicks work fine to select the desired item, but pressing keyboard keys like PgUp, PgDn and the arrow keys also cause listbox items to be selected.

    I'd like the keyboard keys to continue to work normally instead of causing items to be selected from the listbox. What do I need to do?

  2. #2

    Thread Starter
    Fanatic Member VBAhack's Avatar
    Join Date
    Dec 2004
    Location
    Sector 000
    Posts
    617

    Re: Excel: Listbox events false trigger

    After some internet searching I found that the following statement immediately after Form.show will switch the focus from the userform back to Excel and accomplish exactly what I wanted:

    Code:
    AppActivate ("Microsoft Excel")

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width