Expand|Select|Wrap|Line Numbers
- Private Sub stop_Click()
- UserWantsOut = True
- End If
I put a new module and put this public function inside that.
Public UserWantsOut As Boolean
then I put the aborted by user and finished statement in the after next statement, is it correct?
Expand|Select|Wrap|Line Numbers
- For i = 49 To 5500 Step 6
- rich1.SelStart = Len(rich1.Text)
- rich1.SelText = "Before : " & HexByte2Char(arrByte(i)) & _
- " " & HexByte2Char(arrByte(i + 1)) & " " _
- & HexByte2Char(arrByte(i + 2)) & " " _
- & HexByte2Char(arrByte(i + 3)) & " " _
- & HexByte2Char(arrByte(i + 4)) & " " _
- & HexByte2Char(arrByte(i + 5)) _
- & vbNewLine
- If arrByte(i) <> a Then
- arrByte(i) = a
- changeMade = True
- End If
- If arrByte(i + 1) <> b Then
- arrByte(i + 1) = b
- changeMade = True
- End If
- If changeMade Then
- AnyChanged = True
- rich1.SelText = "After : " & HexByte2Char(arrByte(i)) & _
- " " & HexByte2Char(arrByte(i + 1)) & " " _
- & HexByte2Char(arrByte(i + 2)) & " " _
- & HexByte2Char(arrByte(i + 3)) & " " _
- & HexByte2Char(arrByte(i + 4)) & " " _
- & HexByte2Char(arrByte(i + 5)) _
- & " <--- Corrected" _
- & vbNewLine
- End If
- Next
- If UserWantsOut Then
- MsgBox "Aborted by user!"
- Else
- MsgBox "Finished!"
- End If
- End If
- End Sub