procedure TAddSpamForm.AddSpamButtClick(Sender: TObject); var RCount:integer; begin if (DataSG.Cells[1,1]<>'') and (DataSG.Cells[2,1]<>'') then begin // FormSpamList(DataSG); PlanOpForm.SetSpamSG.RowCount:=DataSG.RowCount-1; For RCount:=1 to DataSG.RowCount-1 do begin PlanOpForm.SetSpamSG.Rows[RCount]:=dataSG.Rows[RCount]; end; AddSpamForm.Close end else MessageDlg('Спам-лист не сформирован', mtInformation,[mbOk], 0) end;