Sub RunProcess()
For MyTab = 0 To TabCount
UserForm1.TextBox1.Text = MyTab
UserForm1.Show vbModeless
If UserForm1.Interrupt Then
If MsgBox("Do you want to continue with " & MyTab & "?", vbYesNo) = vbYNo Then
Exit Sub
End If
End If
MyProcess MyTab
Next MyTab
End Sub
'In the form
Sub cmdInterrupt_Click()
Interrupt = True
End Sub
|