userform multitask ?
Yes, you can do that.
for example:
for i = 1 to 1000
DoEvents
If bPause then
Do While bPause = True
DoEvents
Loop
end if
'run code here
Loop
In a button:
bPause = True
In other button:
bPause = False
The essential bit are the DoEvents statements, so it can respond to your
button clicks.
RBS
"Nicodemus" wrote in message
...
hello,
I wish to be able to click a button on my userform while the code is
running, and when the button is clicked to run another module.
example : a loop would check each cell from column A, and when the user
would click a "Pause" button, the loop would stop until the user click a
"Play" button.
Is this possible ?
|