• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 7. Working with Arrays > Expanding to Dynamic Arrays

Expanding to Dynamic Arrays

So far, all the array examples have specified the array’s lower and upper bounds when declared. Doing so creates what’s known as a fixed-size array. If you don’t specify the size of the array when you declare it, you create a dynamic array. To size the array, you must use the ReDim statement as follows:

Dim arrExample() As datatype
...
ReDim arrExample([lower] To upper) As datatype
					


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint