I think this will do it
Type ItemR(Rr As Double, RX As Double, RY As Double, idx As String)
Dim m,i as int ' or use m twice
Sub Fred 'needs a name
Dim myarray(128) As ItemR 'dim an array as our custom structure
For m =0 to 127
myarray(m).Rr = somenumber
myarray(m).RX = somenumber
myarray(m).RY = somenumber
myarray(m).idx = "sometext"
next
Dim maxvalue1= 0 As Int
'Find the max value
For i=0 to127
If myarray(i).Rr > maxvalue1 Then maxvalue1 = myarray(i).Rr
Next
End Sub