troubleshooting Question

Array in type

Avatar of Theo Kouwenhoven
Theo KouwenhovenFlag for Netherlands asked on
Visual Basic Classic
13 Comments1 Solution355 ViewsLast Modified:
Hi Experts,

I have an CSV file containing a specific structure, on this mement I use a split to an array to get the fields, but it would be great to do that with an object,

Current:
Dim a
a = Split(inp, ",")

The structure of the CSV is like this:
someText,a1,b1,c1,a2,b2,c2,a3,b3,c3,moreText

So to get it in an object, it should be look like this:
Type MyType
    sometext as string
    a1 as string
    b1 as string
    c1 as string
    a2 as string
    b2 as string
    c2 as string
etc

a,b,c has 15 repeats and there is also someting like d,e,f and x,y,z

Question:

Can I create:

Type Xabc
    a as string
    b as string
    c as string
EndType

Type MyType
    someText as string
    abc as Xabc
    moreText as string
    xyz as Xabc
End Type

some code...

b = MyType.abc(1).a


Is this possible and how can I move the CSV records to this object ?
ASKER CERTIFIED SOLUTION
vb_elmar

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 13 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 13 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros