Originariamente inviato da sebamix
Allora metti un tasto e nel click:
(Command1 è il tasto che hai messo).codice:Private Sub Command1_Click... If MsgBox("Interrompere?", vbQuestion+VbYesNo,"")=vbYes Then Command1.Tag="stop" End If End Sub
E nella routine, dentro il ciclo:
Ricordati di resettare il Command1.Tag all'inizio della routine.codice:If Command1.Tag="stop" Then Exit Sub/Function End If
Sempre nel ciclo metti un DoEvents, altrimenti il click del tasto scatta quando la routine termina.
![]()
Grazie Seba.![]()