Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Key listener
Thank you for your reply, may I ask what the variable type would be if I use
activecell.address? As in Dim lastCell as xxx? And if I want to display lastCell in a cell, how does it look like? Thanks Ray "John Bundy" wrote: Look up the onkey in vba help, you can do application.onkey"{tab}", *procedure* and you can store the current cell to a variable with activecell.address -John "RaY" wrote: Hi all, I am trying to find out a way of keyboard listening code in the VBA section, the reason I am doing so is because when a user have input a data in a cell, either s/he will press TAB or ENTER. And I have got a code for working on the same row, which press TAB would be fine but by pressing ENTER the code will not work on the intended data. (Different people have different habits, so I am just kind of user friendly to them :) ) Also, is there any way to remember the position of the current cell? Or returning the cell position? It would be so helpful if I am updating a column or row with hundards of data. Many thanks! Ray |