Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'Verifica se o arquivo está no diretorio saida
- Cont_i = 0
- Do
- Cont_i = Cont_i + 1
- Verifica = Dir("C:\ACBrMonitorPLUS\Arquivos\SAIDA\Terminal2-Venda-resp.ini")
- ' If Cont_i = 10 Then
- ' Exit Sub
- ' End If
- Loop Until Verifica <> ""
- 'Abre o arquivo
- Open Saida_ini_Str & "\" & "Terminal2-Venda-resp.ini" For Input As #1
- Arquivo_Texto = Input(LOF(1), #1)
- Close #1
- 'Remove texto OK: do arquivo ini
- Arquivo_Texto = Replace(Arquivo_Texto, "OK: ", "")
- sText = Arquivo_Texto
- lPos1 = InStr(1, sText, "|")
- i = 0
- Do While lPos1 > 0 And lPos1 < 120
- lPos2 = InStr(lPos1 + 1, sText, "|")
- If lPos2 > 0 Then
- sSubString = Mid$(sText, lPos1 + 1, lPos2 - lPos1 - 1)
- Debug.Print sSubString
- If i = 1 Then
- txtFields(4).Text = sSubString
- End If
- Else
- Exit Do
- End If
- lPos1 = InStr(lPos2 + 1, sText, "|")
- i = i + 1
- Loop
- DoEvents
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement