Hi I have the following code (see below) which generates a random number between a lower and an upper limit. It then recalculates the worksheet 1000 times, each time adding the random number to a cumulative total, the only problem is I do not know how to add a counter, a counter is used to keep track of how many times the loop has repeated. The counter is a variable that I want to create especially for this purpose. Can someone please help me incorporate this into the code.

Private Sub cmdCalculate_Click()
  
  Dim intCounter As Integer
  Dim intLower As Integer
  Dim intUpper As Integer
  Dim ingCumTotal As Long
  Dim ingRandom As Long

  [C6] = 0
  [F6] = 0
  
  intLower = [D6]
  intUpper = [E6]
   
  For i = 1 To 1000
    
    ingRandom = Int((intUpper - intLower + 1) * Rnd + intLower)
    
    ingCumTotal = [F6]
  
    [F6] = ingCumTotal + ingRandom
  Next i
    
''MsgBox "ingRandom=" & ingRandom

End Sub