I'm trying to write an Excel macro to save a worksheet as a tab delimited text file, and have it save using international formatting settings (i.e., use a comma as decimal place holder and space as thousands seperator). When I do this from the menus, it works. I've even recorded the macro when I do this from the menus. Yet when I run the resulting macro, the text file uses the system defaults (i.e., uses a period as decimal place holder and comma as thousands seperator).
Here is code from the macro I've created.
With Application
.DecimalSeparator = ","
.ThousandsSeparator = " "
.UseSystemSeparators = False
End With
ActiveWorkbook.SaveAs Filename:= _
"C:\Test\11May11.txt", FileFormat:=-4158, CreateBackup:=False
I'm running on Excel 2002.
If anyone has any ideas how to force Excel to retain the international formatting when saving as a text file, I'd greatly appreciate any advice.
Thanks,
Rick_M
Here is code from the macro I've created.
With Application
.DecimalSeparator = ","
.ThousandsSeparator = " "
.UseSystemSeparators = False
End With
ActiveWorkbook.SaveAs Filename:= _
"C:\Test\11May11.txt", FileFormat:=-4158, CreateBackup:=False
I'm running on Excel 2002.
If anyone has any ideas how to force Excel to retain the international formatting when saving as a text file, I'd greatly appreciate any advice.
Thanks,
Rick_M