craigorama
Technical User
Hi everyone.
I'm trying to do something in vba that i know is easy in VB.NET.
I'd like to find out the length of a variant (array) in vba.
I'm loading a text file line by line into the array and then inserting it into a table.
I have something like this:
dim Line as Variant
Line = Split(loaderTXTStream.Readline, vbTab, , vbTextCompare)
then i'd like to write an if statement saying:
if Line.length >2 then
tmpRecSet.AddNew
tmpRecSet.Fields("BEAR_ID") = tmpLine(0)
tmpRecSet.Fields("UPLOAD_DATE") = tmpLine(1)
tmpRecSet.Fields("UPLOAD_TIME") = tmpLine(2)
tmpRecSet.Fields("TTF") = tmpLine(3)
but i don't know how to find the length. Is this just a VB.NET thing only?
thanks
craig
I'm trying to do something in vba that i know is easy in VB.NET.
I'd like to find out the length of a variant (array) in vba.
I'm loading a text file line by line into the array and then inserting it into a table.
I have something like this:
dim Line as Variant
Line = Split(loaderTXTStream.Readline, vbTab, , vbTextCompare)
then i'd like to write an if statement saying:
if Line.length >2 then
tmpRecSet.AddNew
tmpRecSet.Fields("BEAR_ID") = tmpLine(0)
tmpRecSet.Fields("UPLOAD_DATE") = tmpLine(1)
tmpRecSet.Fields("UPLOAD_TIME") = tmpLine(2)
tmpRecSet.Fields("TTF") = tmpLine(3)
but i don't know how to find the length. Is this just a VB.NET thing only?
thanks
craig