Brian,
The form has a Controls[] collection that you can use to iterate through the controls. You could also put all the controls into a Container class and just set the Container.Enabled.
> ThisForm.txtAuxname[x].Enabled = .T.
>But I keep getting an error "TXTAUXNAME" not found. Why is it not adding the value of [x] on the end and using the intended object name?
Your syntax is treating txtAuxname as an array property.
You could avoid macros with:
for i = 1 to 17
lcControl = "txtAuxname" + alltrim(str(i))
loControl = eval( lcControl )
with loControl
.Enabled = .f.
endwith
>I've had to resort to building the command and using macro substitution to run it to get the intended results:
>
>FOR x = 1 TO 17
> cCommand="ThisForm.txtAuxname"+ALLTRIM(STR(x))+".Enabled"+"=.T."
> &cCommand
>ENDFOR