hello
I would like to know if it is possible to store an array within a structure. For examples for recording people with more than one name. Like this:

Structure Product_Reccord
Dim PNames(3) as string
end structure
It is giving me an error, help please!!

Ok I think i see the error you mean.
You can but you cannot give it an initial size.

Try this

Structure Product_Reccord
Dim PNames() as string
end structure

You could then do

Dim test As Product_Reccord
ReDim preserve test.PNames(3)
test.PNames(1) = "I think this might just work"
MsgBox(test.PNames(1))

The redim preserve allows you to change the size of your array and keep the existing entries
I Hope this helps

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.