Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'Abrimos el archivo
- Dim objFS
- Dim objFile
- ReDim aSumaAmounts(0)
- ReDim aRestaAmount(0)
- sF1 = "C:Users" & Environment("UserName") & "Desktop20190414210000_OPEL_TRANSFER_DETAIL.TXT"
- 'Abrimos el txt del Trasfer Details
- Set objFS = CreateObject("Scripting.FileSystemObject")
- Set objFile = objFS.OpenTextFile(sF1)
- Do Until objFile.AtEndOfStream
- intLine = objFile.Line
- sContent = objFile.ReadLine
- contentSplited = split(sContent, ";")
- If contentSplited(3) = "FA" Then
- If aSumaAmounts(0) = "" Then
- aSumaAmounts(0) = contentSplited(5)
- else
- ReDim Preserve aSumaAmounts(UBound(aSumaAmounts) + 1)
- aSumaAmounts(UBound(aSumaAmounts)) = contentSplited(5)
- End If
- ElseIf contentSplited(3) = "NC" Then
- If aRestaAmount(0) = "" Then
- aRestaAmount(0) = contentSplited(5)
- else
- ReDim Preserve aRestaAmount(UBound(aRestaAmount) + 1)
- aRestaAmount(UBound(aRestaAmount)) = contentSplited(5)
- End If
- End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement