Henry Olive 5 Posted January 30 Good Day, Night ..... ItemNoCol := Ord(ComboBox2.Text[1]) - Ord('A') + 1; QtyCol := Ord(ComboBox3.Text[1]) - Ord('A') + 1; DataStart := StrToInt(ComboBox4.Text); // Which column does data start in for Row := DataStart to ExcelRowsCount do begin ItemNo :=Trim(Sheet.Cells[Row, ItemNoCol]); if (ItemNo <>'') then if (Sheet.Cells [Row, QtyCol] <> '0') or (Sheet.Cells [Row, QtyCol] <> '') then // HERE i get invalid variant operation err.msg begin .... end; What am i doing wrong ? Thank You Share this post Link to post
David Hoyle 68 Posted 3 hours ago Try Sheet.Cells.Item[Row, Col].Value or use early binding and a type library. Share this post Link to post