CopyFromRecordset text to numeric
andrei,
Or convert in your SELECT statement, using CLng, CAST etc depending on the
DB.
NickHK
wrote in message
ups.com...
Hi,
how to recalculate text cell value after formating cell to numer?
...
cmd.CommandText ="select money(text value), money2(text value),
money3(text value) from money"
...
xlWs.Cells(1, 1).CopyFromRecordset(rs)
xlWs.Columns("A:A").NumberFormat = "0.00"
...
After executing values at cell looking like text(1.89898) but cell
formating is numer. After clicking the cell value changing to
numer(1.9) and you can count total money values. Is the is any way to
recalculate/change cells to be number?
--D.
|