View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
mangesh_yadav[_143_] mangesh_yadav[_143_] is offline
external usenet poster
 
Posts: 1
Default Worksheet_SelectionChange


I have something like this on a larger scale:

5 cells: A1, B1 and B2, C1 and C2.

If I enter value in B1, B2 becomes 0. And vice-versa.
If I enter 0 in A1, then B1 and B2 becomes 0.
If C1 is 0 I cannot enter values in B1, and if C2 is 0 I cannot ente
value in B2.


The problem is, if I use Worksheet_Change event, then the event i
fired twice when I try to enter a value in B1 (whe C1 is 0), because
undo the action in this case, which fires the event on resetting B2.

If I use Worksheet_SelectionChange, then it works well as long as
press the ENTER button after entering a value, but if I use the arro
keys, then the whole logic goes for a toss.

Any better alternatives.....?

- Manges

--
mangesh_yada
-----------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...fo&userid=1047
View this thread: http://www.excelforum.com/showthread.php?threadid=27203