


This is like numbering the slots on your CD rack starting at 0 up to 2 and then inserting a CD into each slot.ĭim|Public|Private ArrayName( Subscript) As DataType Notice that each of the three new lines starts off with the variable name and then gives an element number before having a value assigned. You've just made a variable 'strCDRack' that contains three slots (#0, #1, and #2) and is of a String data type. So you declare your CD rack as having three slots: To fit all of these in your rack, the rack must contain at least three slots. Pretend you have three CDs - one by the Deftones, another by Tool, and a third by Disturbed. There are a limited number of slots you can slide CDs into. There are two types of Visual Basic arrays: fixed-size and dynamic.Ī fixed-size array most closely matches our CD rack anology. You know: one of those rectangular boxes with slots to slide CDs in, each above another. If you aren't able to find what you need here, you can check out theĪn array is a lot like a CD rack. This tutorial applies to all versions of Visual Basic, however, versions before Visualīasic 6.0 do not include the split and join function.īelow is a list of the major topics that will be discussed. In this tutorial you will learn the differences between a fixed-size and dynamic array, how to properly declareĮach one, how to access them, how to loop through them, how to erase them, and a few other things. Visual Basic Array Tutorial By Adam Wehmann
