1)clear the B3 formula
2)then try this macro

Option Explicit

Private Sub CommandButton4_Click()
    Dim intCount As Long
    
    For intCount = 15 To 150
        Range("B2") = intCount
        Range("B3") = Evaluate("RANDBETWEEN(1,SUM(Sheet2!A1:A6)/Sheet1!B2)")
        If Range("B4") = "Akkoord; voldoende steken" Then
            Unload Me
            Exit Sub
        End If
    Next
    
End Sub