Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel VBA Programming...How to Trigger an Event WhenYou Move Off a Cell
Hello,
I've got what I think is a "simple problem" for Excel VBA, but can't seem to get it working exactly the way I want. Here's a simple example of what I'd like to do: 1) You have a Number in Cell: B2 2) You have another Number in Cell: C2 3) You calculate the result and put it in Cell: E2 I'd like to be able to enter numbers in Cells B2 and C2, and when I "Move Off" either Cell B2 or C2, have the sum (ie: B2 + C2) calculated and the result put in Cell E2. I'd like this to happen if I "Key Off" (ie: up or down arrow) either B2 or C2, or "Mouse Click Off" (ie: highlight Cell D4 and click on the mouse), or click on the "Delete Key" on the Keyboard. Is there an easy way to do this in VBA? The ActiveCell Property in this case will give me B1 if I click on the "Up Arrow" after being on B2, and B3 if I click on the "Down Arrow"... Since I don't know the direction I've come from, I can't determine it was B2 in this particular case... Thanks a Bunch... |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
unable to get the excel app event trigger for for window resize | Excel Programming | |||
trigger an EVENT when the value in a cell changes? | Excel Programming | |||
Excel VBA event trigger problem | Excel Programming |