Thread: activex
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
rog rog is offline
external usenet poster
 
Posts: 39
Default activex

Joe, i think you can do this by settig a global boolean
variable to true when a command button, on the worksheet,
is pressed. In the "loop" of th maze, you should have a
DoEvents command, and check the value of this global
boolean - if it gets set to True as a result of the button
press, you can stop your code

Rgds

Rog




-----Original Message-----
hi everyone

I have a 'game' which finds it's way through a maze and
leaves a trail where it's been. When it moves on a cell
it changes it's value to "x" then uses the sheet_change
event to initialise the next move.

I realise this could be done several otherways but this
is not the issue. I need an activex control button to
stop the program whenever i desire. Is there a way to
check after each pass whether the 'stop' button is
pressed.
.