I'm using VBA's TransferSpreadsheet to export a table from Access to Excel, thereby creating a new .XLS file.
Some of the columns in my Access table contain numbers representing prices, but those numbers are held to many decimal places.
I want those numbers to appear in the spreadsheet, but rounded up to the nearest penny, i.e. to 2 d.p.'s. Is there any way I can (from within my Access VBA code) specify or alter the format of particular Excel columns, so that the data appears as I would like it to, rather than having to do all of the rounding up in Access (and thereby losing the less significant decimal places of my data) ?
Thanks,
Pat Gale
England
Some of the columns in my Access table contain numbers representing prices, but those numbers are held to many decimal places.
I want those numbers to appear in the spreadsheet, but rounded up to the nearest penny, i.e. to 2 d.p.'s. Is there any way I can (from within my Access VBA code) specify or alter the format of particular Excel columns, so that the data appears as I would like it to, rather than having to do all of the rounding up in Access (and thereby losing the less significant decimal places of my data) ?
Thanks,
Pat Gale
England