Yes, escaping Workbook name needs some more attention in the code. Currenly the procedure expects this name to be quoted from the caller, i.e. use "[Cod. Postal]" when calling WriteToExcel, not "Cod. Postal" for Workbook name but obv. this is cumbersome and error prone.

I have no idea what is the problem with field names though and why would these need quoting when accessing Fields collection. Using numeric indexes is a solution to a problem that should never happen.

Btw, Dim aa As Single is dubious -- better use Long.

cheers,
</wqw>