View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mike B. Mike B. is offline
external usenet poster
 
Posts: 15
Default VBA help for simulation

Need help to simulate an electronic card in excel.

A certain card has 2 inputs and 1 output.

Inputs:
C8, C9

Outputs:
C10

At the start, C8 and C9 both have a value of 0. C10 has a value of 0 and
"UNLATCHED" appears in F10.

C9 (has an external link) changes from 0 to 1 when I change some data. This
causes C10 to have a value of 1. "UNLATCHED" disappears from F10 and
"LATCHED" appears in D10.

I change C9 back to 0 when I change the data again. C10 still has a value of
1. "LATCHED" remains in D10.

I created a button that changes C8 from 0 to 1 and vice versa. When I press
the button, C8 becomes a 1.
I want C10 to become 0. "LATCHED" disappears from F10 and "UNLATCHED"
appears in F10. After 2 seconds, C8 becomes a 0 and we are back at square 1.

Maybe this will help:

C8 C9 C10 D10 F10
1. 0 0 0 0
"UNLATCHED"
2. 0 1 1 "LATCHED"
3. 0 0 1 "LATCHED"
4. 1 0 0
"UNLATCHED"
5. back to square 1

Thanks in advance