M
mbarron
Hi,
I'm trying to build an Excel (2000) application for teaching kid
about the normal curve in statistics. Essentially, the program draw
repeated random samples from a column of data and then plots the mean
of each sample (the more samples you draw, the closer the chart wil
look like a normal curve).
Right now I've got the main code set up in a "for...next" loop tha
loops through 1,000 times. But I'd like to set the macro up to run i
an infinite loop until the user presses a stop button. Is such a thin
possible? Mentally, I'm imagining the code as "do until the use
presses button." But I can't figure out if it's possible for a use
event to halt an action rather than initiate it. Can anyone help m
out?
A sub-problem to this is that I'd like to allow the user to adjust th
speed of the macro as it runs (the idea being, the first couple time
through the user might want the program to pause briefly between loop
to discuss it with his/her students but then speed it up to build th
graph quickly). I figured I'd just put a spinner control on th
spreadsheet and tie it to some sort of "wait" or "ontime" code in m
main macro. But the same problem exists as in the paragraph above: ho
to allow users initiated actions DURING macro execution.
Anyone know how I can get the functionality I'm looking for or am
dreaming?
Thanks,
Martin Barro
I'm trying to build an Excel (2000) application for teaching kid
about the normal curve in statistics. Essentially, the program draw
repeated random samples from a column of data and then plots the mean
of each sample (the more samples you draw, the closer the chart wil
look like a normal curve).
Right now I've got the main code set up in a "for...next" loop tha
loops through 1,000 times. But I'd like to set the macro up to run i
an infinite loop until the user presses a stop button. Is such a thin
possible? Mentally, I'm imagining the code as "do until the use
presses button." But I can't figure out if it's possible for a use
event to halt an action rather than initiate it. Can anyone help m
out?
A sub-problem to this is that I'd like to allow the user to adjust th
speed of the macro as it runs (the idea being, the first couple time
through the user might want the program to pause briefly between loop
to discuss it with his/her students but then speed it up to build th
graph quickly). I figured I'd just put a spinner control on th
spreadsheet and tie it to some sort of "wait" or "ontime" code in m
main macro. But the same problem exists as in the paragraph above: ho
to allow users initiated actions DURING macro execution.
Anyone know how I can get the functionality I'm looking for or am
dreaming?
Thanks,
Martin Barro