I'm trying to create a validation program which entails throwing everything in a csv file that i have into array and then looping through it and doing a comparison.
Here is some of my preexisting code which currently finds the name of a file that I want to do a comparison off by basically using a InStrRev function ...
Private Function getFileName(ByVal tProcessDir As String, ByVal tARZ FileName As String) As String Dim tXSDName As String Dim tSingleLetterCheck As String Dim ii As Short Dim ii2 As Short tXSDName = tXSDFileName ii = InStrRev(tXSDName, "_") + 1 tSingleLetterCheck = VB.LCase(Mid(tXSDName, ii)) If Len(tSingleLetterCheck) = 1 Then ii2 = InStrRev(tXSDName, "_", ii - 2) - 1 tXSDName = Mid(tXSDName, 1, ii2) End If ii = InStr(tXSDName, "_ARZ") - 1 If ii <> -1 Then tXSDName = Mid(tXSDName, 1, ii) End If ii = InStr(tXSDName, "_HIST") - 1 If ii <> -1 Then tXSDName = Mid(tXSDName, 1, ii) End If ii = InStrRev(tXSDName, "_") If Mid(tXSDName, ii) = "_TT" Then tXSDName = Mid(tXSDName, 1, ii - 1) End If Return tARZ End Function
What i would like to do is have this function store everything from my file_names.csv file into an array and just loop through the array to match the appropriate filename to the appropriate file. Hopefully that made sense. Any idea on how to go about this would be appreciated as I've never done anything like this before.