Create Excel file with formula in sheet cells using EasyXLS component! XLSX, XLSM, XLSB, XLS files in VB6.
https://www.easyxls.com/manual/tutorials/vb6/add-excel-formula.html