This means that you have used the wrong index on the panel. The view with index 2 must be a TextBox and you are attempting to cast it as a CheckBox.
You could alternatively do a scan through each view on the panel with something like....
Code:
For Each v As View In p.GetViewsRecursively
If v Is CheckBox Then
' what you want here, maybe check tag and enable?
End If
Next
I've done this snippet on my tablet as I don't have my laptop to hand so it might not be exactly correct but hopefully you get the idea.