I need to convert a TXT file with UNIX encoding for Windows, I found a solution in Vba, but I can’t insert it in the code, could you help me?
'ahteixeira 2016 para MaximoAccess
Dim fOrigem$, fDestino$, Linha$
fOrigem = “C:\FEBRABAN\OI_UNIX.txt”
fDestino = “C:\FEBRABAN\OI_UNIX_Convertido.txt”
Open fOrigem For Input Access Read As #1
Line Input #1, Linha
If EOF(1) Then
Linha = Replace(Linha, vbLf, vbCrLf)
Open fDestino For Output Access Write As #1
Print #1, Linha
Are just looking to insert the code?
If so, Try the “Invoke Code” activity.
Hopefully this helps.
Yes, I am using the “Invoke Code” activity… but it has the errors attached.
Your code seems not VB.net but VBA or VB6. If you want to use VBA, can you try to use Invoke VBA activity with Excel?
you can find a possible solution here, without Invoke Code Activity.
@Yoichi is right, it is not possible to execute copied VBA code in an Invoke Code activity. The approach of the Invoke Code activity is different, that’s why you have all the error messages. You can find more information about Invoke Code Activity in the documentation.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.