for i:=0 to StringGrid1.ColCount-1 do begin for j:=0 to StringGrid1.RowCount-2 do begin StringGrid1.Cells[i,j]:=InputBox('','',''); end; end;