with thisform
For m.lii=.ControlCount TO 1 STEP -1
m.loObj=.Controls(m.lii)
=IIf(Lower(obj.Class)=="ycnt",.RemoveObject(obj.Name),.T.)
Next
endwith
MartinaJ
>thanks Albert for the reply.
>
>i use this code below to try to remove all containers on the form ( based on the class ycnt container)
>
>with thisform
>For Each obj In .Controls
> If Lower(obj.Class)=="ycnt"
> .RemoveObject(obj.Name)
> DoEvents
> Endi
>Next
>endwith
>
>
>i tried also to remove first all objects in each container based ycnt and then remove the container form the from with removeObject(obj.name)....no good result.
>there is always some ycnt containers persisting appear on the form.
>using the vertical form.scrollbar make the form with garbages also.
>
>see the 2 photo attached.