Povo, bom dia!
Preciso da ajuda de vocês para gerar um txt sem a última linha em branco. O código abaixo gera o arquivo e deixa uma linha em branco, um CrLf sem eu colocar nada no código, isso esta comprometendo o sistema que o lê.
Já tentei replace, Chr(127), Chr(8) e nada resolve.
'Nome do Arquivo
Sub NomeCabecalho()
FileNum = FreeFile(0)
fname = ThisWorkbook.Path & "\Teste.txt"
nString = ""
If fname <> False Then
Open fname For Output As #FileNum
1 nString = nString & “H”
2 nString = nString & “123456” 'UserForm1.strTomaInsc
Print #FileNum, nString
Close #FileNum
End If
End Sub