Greetings y'all...
After a break from Access development, I'm back in the saddle, and I think it is time to stop beating my head against the proverbial wall. This is a simple thing to do, and I can do it in a few different languages, unfortunately, VBA isn't one of them.
What I'm trying to do is open a text file, read a line, parse out data and return the data values in an array. So...
This is the start of a relatively big project so this code will change, but the concept will not - run readFile, get the array and do something with it.
I have fumbled through many different ways to tackle this, coming short with type mismatch, and other compile errors, but Murphy keeps making an appearance.
Any help is appreciated.
"If it's stupid but works, it isn't stupid."
-Murphy's Military Laws
After a break from Access development, I'm back in the saddle, and I think it is time to stop beating my head against the proverbial wall. This is a simple thing to do, and I can do it in a few different languages, unfortunately, VBA isn't one of them.
What I'm trying to do is open a text file, read a line, parse out data and return the data values in an array. So...
Code:
Private Sub readFile()
...
inFile = FreeFile
Open "C:\test.txt" For Input As inFile
...
While Not EOF(inFile)
Line Input #inFile, txtLineIn
Dim test() = processStaticLine(txtLineIn) '<--- error caused here
...
end sub
Private Function processStaticLine(stringIn As String) As String
...
sArrayOut(rst2("rank")) = fld
...
processStaticLine = sArrayOut
End Function
I have fumbled through many different ways to tackle this, coming short with type mismatch, and other compile errors, but Murphy keeps making an appearance.
Any help is appreciated.
"If it's stupid but works, it isn't stupid."
-Murphy's Military Laws