for u := 1 to 9 do begin if FindComponent('but'+inttostr(u)) <> nil then begin (Form1.FindComponent('but'+inttostr(u)).Free); end; end;