vbImageProc\Filter" &amp; lIndex
    If (cR.KeyExists) Then
        cR.ValueKey = "Weight"
        cR.ValueType = REG_DWORD
        txtWeight.Text = cR.Value
        cR.ValueKey = "Values"
        cR.ValueType = REG_BINARY
        vValues = cR.Value
        For i = 0 To 48
            If (vValues(i * 2) &lt;&gt; 0) Then
                txtValue(i) = -1 * vValues(i * 2 + 1)
            Else
                txtValue(i) = vValues(i * 2 + 1)
            End If
        Next i
    End If
    
End Sub
Private Sub 