1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Excel vba detect if the Left Arrow or Right Arrow has been pressed

Discussion in 'Business Applications' started by Keebellah, Jan 16, 2010.

Thread Status:
Not open for further replies.
Advertisement
  1. Keebellah

    Keebellah Trusted Advisor Thread Starter

    Joined:
    Mar 27, 2008
    Messages:
    6,553
    First Name:
    Hans
    Hi,
    I can't seem to capture if vbkeyleft or vbkeyright as a trigger in a sheet.:eek:

    .... by change etc.

    some code like

    case select vbkeypress or last key pressed
    case = vbkeyleft
    .... code
    case vbkeyright
    .... code
    case else
    exit sub
    end select

    The fact is tht I press the arrow key and no change occurs but I do want to capture the fact one of the two arrow keys has been pressed.:confused:

    Help appreciated
     
  2. Keebellah

    Keebellah Trusted Advisor Thread Starter

    Joined:
    Mar 27, 2008
    Messages:
    6,553
    First Name:
    Hans
    It's not solved but nobody looked, so I think it's over the top.
     
  3. Rollin_Again

    Rollin_Again

    Joined:
    Sep 4, 2003
    Messages:
    4,912
    Hans,

    I played around with this a bit but couldn't get it to work in Excel. I did stumble across a regular VB 6.0 application that was able to detect the arrow press and it might be able to be adapted to suit your needs. I'll look around and see if I can find the link.

    Rollin
     
  4. Keebellah

    Keebellah Trusted Advisor Thread Starter

    Joined:
    Mar 27, 2008
    Messages:
    6,553
    First Name:
    Hans
    Hi Rollin,

    Thanks for trying, I did it another way and wrote some coded for brain_hurtz's post and it does the trick.
    If you find something I'd like to try it, I'm still looking too.
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/894699

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice