4

What are all the build in data structures for VB6 (Microsoft Access) ? I know there are arrays, but are there other more modern data structures?

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
Milhous
  • 14,473
  • 16
  • 63
  • 82

6 Answers6

5

Disconnected recordsets can also be useful: syncing two lists with VBA

Community
  • 1
  • 1
Fionnuala
  • 90,370
  • 7
  • 114
  • 152
4

It has a Dictionary: Does VBA have Dictionary Structure?

And Collection: VBA: Resources for Python Programmer

Community
  • 1
  • 1
Mitch Wheat
  • 295,962
  • 43
  • 465
  • 541
3

The excellent book Hardcore Visual Basic by Bruce McKinney includes some code for creating linked lists, stacks, etc. as part of its introduction to object-based programming with VB6. The book is now available free online.

MarkJ
  • 30,070
  • 5
  • 68
  • 111
2

I don't think I understand the question. When I read it, I thought of:

  • Arrays
  • Collections
  • Types
  • Enums

and so forth. Not sure if I'd consider standalone class modules as part of the answer, as they can have any structure you want, rather than being a particular data structure. And, of course, VBA being COM-based, it can use any data structure from compatible COM objects. This may or may not require a type library (depends on the COM object's implementation).

David-W-Fenton
  • 22,871
  • 4
  • 45
  • 58
1

You can also create your own (better accessibility/performance XML collections) in this way:

MS XML Collections

Also consider using hashtables:

Hash Tables

miPwn
  • 1,166
  • 1
  • 13
  • 29
1

I written quite a lot of code in VB6 and for sure I used Dictionary and Collection classes a lot. But I still think that they are not enough in many cases, that's why I advise you to take a look at this library:

http://sourceforge.net/projects/vbcorlib/

that it's a port of .NET libraries to VB6.

Patrizio Rullo
  • 491
  • 1
  • 4
  • 13