I have a code with looping statements like that
Code: Select all
Sub Test()
Dim i As Long
For i = 1 To 10000
'code
Next i
End Sub
and the other button is the Stop which I need to create a macro that stops the first macro if clicked
Is that possible? And if possible I need to know the value of the variable i to know where is the code stopped exactly