Hola Cristhor1982.
Si no interpreté mal la finalidad del código, yo haría:
Código Delphi
[-]
...
var
TS: TStrings;
begin
if Clipboard.HasFormat(CF_TEXT) then
begin
TS := TStringList.Create;
try
TS.Text := clipboard.AsText;
StringGrid1.RowCount := TS.Count;
StringGrid1.Cols[StrToInt(Edit1.Text)]:= TS;
finally
TS.Free;
end;
end
else
ShowMessage('No hay texto en el PortaPapeles');
end;
Saludos.