Txt con macro

Buen día tengo una macro que convierte en txt mi archivo de excel, pero lo que necesito hacer es que al guardar o generar el txt me lo guarde en la codificación UTF 8 y no en ANSI
me podrán ayudar.
Este es mi código de la macro:
Sub ExportarTextoDelimitado()
Application.ScreenUpdating = False
Dim Archivo As String, Delimita As String, A_num As Integer, _
Fila As Long, Fila_1 As Long, Fila_n As Long, _
Col As Integer, Col_1 As Integer, Col_n As Integer, _
Linea As String, Celda As String
Archivo = "C:\Users\tibarra\Documents\TXT\Pago_Parcialida.txt"
Delimita = "|"
On Error GoTo Salida:
A_num = FreeFile
With ActiveSheet.UsedRange
Fila_1 = .Cells(1).Row
Col_1 = .Cells(1).Column
Fila_n = .Cells(.Cells.Count).Row
Col_n = .Cells(.Cells.Count).Column
End With
Open Archivo For Output Access Write As #A_num
For Fila = Fila_1 To Fila_n
Linea = ""
For Col = Col_1 To Col_n
If Cells(Fila, Col).Value <> "" Then
Celda = Application.Text(Cells(Fila, Col), Cells(Fila, Col).NumberFormat)
Linea = Linea & Celda & Delimita
Else
Celda = ""
End If
Next
Linea = Left(Linea, Len(Linea) - Len(Delimita)) & String(0, Delimita)
Print #A_num, Linea
Next
Salida:
On Error GoTo 0
Close #A_num
End Sub

Añade tu respuesta

Haz clic para o