This particular use of a nested "For" is something that I did not expect. I have trimmed it down to a very simple example. The outer For loop works perfectly using the member of the Type "abc", but the enclosed For statement produces the compiler error. I've hunted for an explanation, but so far have found none.
Option Explicit
Private Type abc
i As Integer
j As Integer
End Type
Private Sub CommandButton1_Click()
Dim dog As abc
Dim cat As abc
For dog.i = 1 To 10
For cat.i = 5 To 9
Next
Next
End Sub