Create a Static Array Variable in VBA
This Excel VBA macro tutorial shows you how to create a static array variable in VBA. You will learn how to create or declare an array as well as to fill or populate or insert values into an array variable and then access the values contained within the array. This tutorial focuses on a static array variable. That means that the variable’s size cannot be changed after declaration.
Tutorial Length (mm:ss): |
9:32 |
Sign Up to View Tutorials
|
Downloadable Files: |
Yes |
Microsoft Office Program: |
Microsoft Office Excel |
|
|
Keywords: |
training excel macro vba visual basic static basic array variable declare create access use insert |
This Excel VBA macro tutorial shows you how to store or insert values into an array in VBA. This tutorial covers the basics of putting values into an array for later retrieval. This is one of the very basic things that you must do with an array.
Tutorial Length (mm:ss): |
3:47 |
Microsoft Office Program: |
Microsoft Office Excel |
|
|
Keywords: |
training excel macro vba visual basic array arrays store values insert |
This Excel VBA macro tutorial shows you how to get or retrieve or output values from an array in VBA. This tutorial covers the basics of getting values out of an array for use within the macro and VBA. This is a great tutorial for those just starting out with arrays in macros.
Tutorial Length (mm:ss): |
4:15 |
Microsoft Office Program: |
Microsoft Office Excel |
|
|
Keywords: |
training excel macro vba visual basic array output retrieve values elements data from |
This Excel VBA macro tutorial shows you how to determine the number of items or elements contained within an array variable. This is very important when you want to loop through an array variable. Note, this is not necessarily the same as the upper bound or last index number of an array variable and it can take some extra work, which is covered in this tutorial, to determine exactly how many elements are contained within an array variable.
Tutorial Length (mm:ss): |
9:11 |
Microsoft Office Program: |
Microsoft Office Excel |
|
|
Keywords: |
training excel macro vba visual basic retrieve find number elements items index array variable |
This Excel VBA macro tutorial shows you how to find the first and last index number of an array variable. These index numbers are also referred to as the lower and upper bounds of an array variable. This information is very helpful when trying to loop through an array or access its contents.
Tutorial Length (mm:ss): |
4:49 |
Microsoft Office Program: |
Microsoft Office Excel |
|
|
Keywords: |
training excel macro vba visual basic determine first last upper lower bound index number array |
This Excel VBA macro tutorial shows you how to create a dynamic array variable in vba and macros. This tutorial covers how to declare a dynamic array; how to size a dynamic array; how to resize a dynamic array; how to input and output values from an array variable; and how to add values or elements to an array variable without deleting previously stored elements within the array. This is a comprehensive overview and explanation of dynamic arrays in vba and macros.
Tutorial Length (mm:ss): |
19:36 |
Microsoft Office Program: |
Microsoft Office Excel |
|
|
Keywords: |
training excel macro vba visual basic array arrays dynamic declare create insert redim preserve elements values input output |
This Excel VBA macro tutorial shows you how to loop through a static array variable in VBA. This tutorial will show you how to use a For Next Loop in order to quickly add elements or items to an array variable and also to quickly retrieve or get elements from a static array variable. This technique is very useful and will help you streamline your VBA code.
Tutorial Length (mm:ss): |
8:23 |
Microsoft Office Program: |
Microsoft Office Excel |
|
|
Keywords: |
training excel macro vba visual basic static basic array variable loop through retrieve pull values elements |
This Excel VBA macro tutorial shows you how to loop through the elements contained within a dynamic array variable in VBA. This tutorial will show you how to use a For Next Loop in order to access each of the elements within a dynamic array. This is a little tricky with a dynamic array because you need to dynamically reference the upper and lower bounds of the array variable. This tutorial is a must view for anyone who works with dynamic arrays in VBA.
Tutorial Length (mm:ss): |
8:52 |
Microsoft Office Program: |
Microsoft Office Excel |
|
|
Keywords: |
training excel macro vba visual basic loop through dynamic array elements retrieve output view upper lower bound |
This Excel VBA macro tutorial shows you how to increase and decrease the size of a dynamic array variable in VBA. This is the same as increasing or decreasing the index number or lower and upper bounds of a dynamic array and will allow you to put more elements into a dynamic array. This is the feature of a dynamic array that actually makes it dynamic.
Tutorial Length (mm:ss): |
6:30 |
Microsoft Office Program: |
Microsoft Office Excel |
|
|
Keywords: |
training excel macro vba visual dynamic array increase decrease size upper lower bound index number store elements |
This Excel VBA macro tutorial shows you how to add elements to a dynamic array variable in VBA. This tutorial will also cover how to prevent previous elements in the array from being erased when you add a new element to the array. This is especially important when you need to increase the size of the array in order to add an extra element or multiple new elements to the array, which is also covered in this tutorial.
Tutorial Length (mm:ss): |
5:45 |
Microsoft Office Program: |
Microsoft Office Excel |
|
|
Keywords: |
training excel macro vba visual basic dynamic array variable insert add elements values size increase |
This Excel VBA macro tutorial shows you how to quickly add elements to a dynamic array using a loop. The loop used for this example is a For Next Loop. This tutorial covers how to use variables instead of hard coded values to resize a dynamic array and then to add a new element to the array.
Tutorial Length (mm:ss): |
8:16 |
Microsoft Office Program: |
Microsoft Office Excel |
|
|
Keywords: |
training excel macro vba visual dynamic array add elements items values loop for next quickly |