Estou criando uma macro que le o arquivo.txt linha a linha com esse código.
- Código: Selecionar todos
Sub ReadAsciiFile()
Dim sFileName As String
Dim iFileNum As Integer
Dim sBuf As String
Dim html As String
' edit this:
sFileName = "C:\test.txt"
' does the file exist? simpleminded test:
If Len(Dir$(sFileName)) = 0 Then
Exit Sub
End If
iFileNum = FreeFile()
Open sFileName For Input As iFileNum
Do While Not EOF(iFileNum)
Line Input #iFileNum, sBuf
html = html & vbCrLf & sBuf
Loop
' close the file
Close iFileNum
End Sub
esse arquivo tem cerca de 200 linhas, porem em uma das linhas é tipo essa:
< w e b v e r s i o n class='' style='color: #00ffff; text-decoration: none;'>" & Range("L2").Value & "< / w e b v e r s i o n > < / t d >
como posso fazer para a vba pegar o valor do Range("L2").Value ao inves de trazer escrito "Range("L2").Value" no resultado?
Obrigado
