Private Sub Form_Click()n = 1Do Until Sum > 10000 j = 1 For i = 1 To n j = j * i Next n = n + 1 Sum = Sum + jLoopPrint n - 1End Sub