M
Michel Peeters
I am exporting a recordset to an XL sheet.
I have to set the format from the XL sheet-columns in VBA.
The currency is changing from column to column (from field to field in the recordset)
strFormat = "# ##0.00 \" & strCur & "; - # ##0.00[Red] \" & strCur
xlsheet.Range(.Cells(2, intKol), .Cells(intRC, intKol)).NumberFormat = strFormat
intKol= the column number from the loop
intRC= total number of records
As long as strCur = "€" or = "$" or = "EUR" it works.
But when strCur = "USD" or "CHF" I get error 1004:
Unable to set the Number Format property of the Range class.
In regional setting I have:
country = belgium
currency = €
thousand seperator = space
Please help
I have to set the format from the XL sheet-columns in VBA.
The currency is changing from column to column (from field to field in the recordset)
strFormat = "# ##0.00 \" & strCur & "; - # ##0.00[Red] \" & strCur
xlsheet.Range(.Cells(2, intKol), .Cells(intRC, intKol)).NumberFormat = strFormat
intKol= the column number from the loop
intRC= total number of records
As long as strCur = "€" or = "$" or = "EUR" it works.
But when strCur = "USD" or "CHF" I get error 1004:
Unable to set the Number Format property of the Range class.
In regional setting I have:
country = belgium
currency = €
thousand seperator = space
Please help