I cicli che hai indicato non sono corretti. In linea di massima dovrebbe essere

codice:
    Dim i As Integer
    Dim j As Integer
    Dim k As Integer
    
    For i = 1 To 41 Step 5
        For j = i To i + 4
            For k = i + 5 To 50
                numero1 = adoPrimaryRS(j)
                numero2 = adoPrimaryRS(k)
                condizione = Abs(numero1 - numero2)
                If condizione = 30 Then
                    ' .......
                End If
            Next k
        Next j
    Next i