Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
Function CheckFileDetails() Dim fso, objFile_B, objFile_A, FileA, SavedFilesFolder, intRows Dim FileAContents, arrFileAContents, strLine, linecount 'Set Variables linecount = 0 strFolder = "C:\Test_Auto\" objFile_B = "FileB.txt" objFile_A = "FileA.txt" 'Create Objects Set objFSO = CreateObject("Scripting.FileSystemObject") Set objShell = CreateObject("Shell.Application") 'Set variables billerFound = False Set objFSO = CreateObject("Scripting.FileSystemObject") Const intForReading = 1 'Read in the contents of the biller master file and new billers file Set objFile_B = objFSO.OpenTextFile(strFolder & objFile_B, intForReading) Set objFile_A = objFSO.OpenTextFile(strFolder & objFile_A, intForReading) 'Get todays date today = Date TodayArray = Split(today, "#", -1, 1) today = TodayArray(0) 'Move through the new biller temp file and check if any of the activation dates are before todays date (if so check the BMF) While Not (objFile_A.AtEndOfStream) Dim NewBillerArray strLine = objFile_A.ReadLine ' call SplitUpNewBillerFile(strLine) NewBillerArray = Split(strLine, ",", -1, 1) 'check the activation date is before or on todays date If (NewBillerArray(0) <= today) Then ' if NewBillerArray(0) exists in strLine strLineBMF = objFile_B.ReadLine 'searching the BMF for Long Name - if that exists, then check that entire line and compare against New Biller file While Not ((objFile_B.AtEndOfStream) OR (billerFound = True)) strLineBMF = objFile_B.ReadLine 'read in line again on next loop If InStr(strLineB, NewBillerArray(3)) Then 'do something End If Wend End If Wend 'Close both files that we're comparing objFile_B.Close objFile_A.Close End Function
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.