ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Error when saving as TAB TXT (euro transforms in $) (https://www.excelbanter.com/excel-programming/432157-error-when-saving-tab-txt-euro-transforms-%24.html)

SpeeD

Error when saving as TAB TXT (euro transforms in $)
 
Hi.

I've made a simple macro to save 2 sheets do a txt tab separated. The
problem is that the numbers formated as "currency" (with a euro sign)
end up with a dollar sign in the resulting txt.

Does anyone knows why this is hapenning?

this is my code


Sheets("HOLDI").Select
ActiveWorkbook.SaveAs Filename:=3D _
ActiveWorkbook.Path & "\..\Dados_holdi.txt" _
, FileFormat:=3DxlText, CreateBackup:=3DFalse
Sheets("EMP").Select
ActiveWorkbook.SaveAs Filename:=3D _
ActiveWorkbook.Path & "\Dados_emp.txt" _
, FileFormat:=3DxlText, CreateBackup:=3DFalse

ActiveWindow.Close

Thnks a lot

SpeeD

Jacob Skaria

Error when saving as TAB TXT (euro transforms in $)
 
Try the below macro

Sub Macro3()
Dim strPath As String

strPath = ActiveWorkbook.Path & "\"
Application.DisplayAlerts = False

Sheets("HOLDI").Select
ActiveWorkbook.SaveAs Filename:=strPath & "Dados_holdi.txt", _
FileFormat:=xlText

Sheets("EMP").Select
ActiveWorkbook.SaveAs Filename:=strPath & "Dados_emp.txt", _
FileFormat:=xlText

Application.DisplayAlerts = True
ActiveWindow.Close False

End Sub

If this post helps click Yes
---------------
Jacob Skaria


"SpeeD" wrote:

Hi.

I've made a simple macro to save 2 sheets do a txt tab separated. The
problem is that the numbers formated as "currency" (with a euro sign)
end up with a dollar sign in the resulting txt.

Does anyone knows why this is hapenning?

this is my code


Sheets("HOLDI").Select
ActiveWorkbook.SaveAs Filename:=3D _
ActiveWorkbook.Path & "\..\Dados_holdi.txt" _
, FileFormat:=3DxlText, CreateBackup:=3DFalse
Sheets("EMP").Select
ActiveWorkbook.SaveAs Filename:=3D _
ActiveWorkbook.Path & "\Dados_emp.txt" _
, FileFormat:=3DxlText, CreateBackup:=3DFalse

ActiveWindow.Close

Thnks a lot

SpeeD



All times are GMT +1. The time now is 05:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com