with thisform For m.lii=.ControlCount TO 1 STEP -1 m.loObj=.Controls(m.lii) =IIf(Lower(loObj.Class)=="ycnt",.RemoveObject(loObj.Name),.T.) Next endwithWhen use the [for i=1 to .controlcount]......i put a structure try/catch/endtry for avoiding error (there is always error) !