TextFileDecimalSeparator Property Example

This example saves the original decimal separator and sets it to a comma for the first query table on Sheet1, in preparation for importing a French text file (for example) into the U.S. English version of Microsoft Excel.

strDecSep = Worksheets("Sheet1").QueryTables(1) _
    .TextFileDecimalSeparator
Worksheets("Sheet1").QueryTables(1) _
    .TextFileDecimalSeparator = ","