>Rand(-1) >Select c.Company,; > c.Contact, ; > RTRIM(e.First_Name)+' '+Rtrim(e.Last_Name) As eName, ; > CAST(Chrtran(e.Notes,Chr(13),'') As m) As Notes ; > FROM (_samples+'data\customer') c, (_samples+'data\employee') e ; > INTO CURSOR xx ; > nofilter > >loExcel = Createobject('Excel.Application') >With loExcel > .Workbooks.Add() > .Visible =.T. > VFP2Excel('xx',.ActiveWorkbook.ActiveSheet.Range('A1')) >Endwith >All I did was to remove the codes added by you in VFP2Excel. I didn't try before removing those lines.