>I have several forms with many objects as below
>
> form1.object1.enabled = .F.
> form1.object2.enabled = .F.
> form1.object3.enabled = .F.
>... etc
>
>I need to enabled these properties using for command
>
>for myObj = 1 to 100 do
>
> "form1.object" +myObj + ".enabled = .T.
>
>endfor
>
>Sometimes a form can have 5 objects, others can have 20, 55 , etc
>
>How can I do to prevent errors with for command when and object does not exist ?
If you have several similar objects, you can actually create them as an array of objects in the first place. In FAQ #8110 I outline several alternatives, including this one - which several UT members find somewhat controversial, because it is an undocumented feature I believe.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)