Hi 
I know there's several other threads about this, however I can't seem to find a solution on what i'm doing wrong.
Please help me find out what is wrong with below code:
Dim i As Integer
Dim varLookup(1 To 5) As Integer
For i = 1 To 5
varLookup(i) = varLookup(i + 10)
If Me.Controls("txtPris" & i) <> "" And Me.Controls("txtrabat" & i) <> "" Then
Me.Controls("txtPris" & i).Value = Replace(varLookup(i) * (1 - (Me.Controls("txtRabat" & i) / 100)), ".", ",")
End If
Next i
I get the error message "The subcript is out of range"
The Whole code is written in a userform, and is executed when a commandbutton is clicked.
Thanks for helping out
Bookmarks