How do I dimension a dynamic array to contain a “text Key” in field one, and a computed double in field two, of each element?
How do I dimension a dynamic array to contain a “text Key” in field one, and a computed double in field two, of each element?
Last edited by jdfjab; 06-06-2012 at 09:08 AM.
It is not clear what you are asking.
Are you wanting to ReDim an array?
Or are you wanting to create a User-defined type (with a string and double)?
Or are you wanting a Variant array?
(What is a "text key"?)
![]()
Please Login or Register to view this content.
Entia non sunt multiplicanda sine necessitate
If what you are asking is how to create a two-dimensional array with text in the first dimension (string) and number in the second dimension (double) then I would probably suggest declaring it as a variant type. Other less favorable option would be to use an array of arrays and declare each array type seperately (each dimension gets its own array).
Hope this helps.
abousetta
Please consider:
Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.
Sorry if I got the terminology mixed up.
I want to create a user-defined array with a string and double.
shg's example is the way to go.
Thanks Shg,
That gives me the starting point I was looking for.
I'll get back to share what I end up with when it's all done.
Shg,
I'm back for more help. When I attempt to use the "type" code syntax:
I "loose" my procedure. Is there some "trick" I'm missing to insert the "Type" code syntax above my procedure name?![]()
Please Login or Register to view this content.
Thanks.
You type the "Type" at the beginning of a Module outside of any procedure. That way every procedure in that module can use it. If you need more than just one module to use it, you add the word Public before type. And if you want only one module to use it you can add private.
Thanks Steven.
Through that hurdle and on to the next.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks