Get the element in an array by index : Array « Data Type « VBA / Excel / Access / Word

Home
VBA / Excel / Access / Word
1.Access
2.Application
3.Data Type
4.Data Type Functions
5.Date Functions
6.Excel
7.File Path
8.Forms
9.Language Basics
10.Math Functions
11.Outlook
12.PowerPoint
13.String Functions
14.Windows API
15.Word
16.XML
VBA / Excel / Access / Word » Data Type » Array 
Get the element in an array by index
 

Sub MonthNames()

    Dim varMonth As Variant
    
    varMonth = Array("Jan""Feb""Mar""Apr")
    
    Debug.Print varMonth(1)
    Debug.Print varMonth(2)
    
End Sub

 
Related examples in the same category
1.Declaring a static array is similar to declaring a variable
2.Override the Option Base setting by specifically setting the lower bound in the array declaration
3.Declaring and Working with Fixed Arrays
4.Declaring array and setting bounds
5.Arrays are typically initialized inside a loop
6.Use the For Each...Next to assign value to an array
7.Use count function to count array
8.Use count function to sum array
9.Using a One-Dimensional Array
10.Define and use multidimensional array
11.Create an Array, assign value and use Loop to show its value
12.Use LBound and UBound in for statement
13.Using a Two-Dimensional Array and Reference its elements
14.Understanding Errors in Arrays
15.Function Parameter type: Array
16.Assign range to an array
17.Declaring a static array is similar to declaring a variable, with one small exception
18.To assume that 1 is the lower index for your arrays
19.Multidimensional arrays
20.Sorts the List array in ascending order
21.Sorting an Array
22.Searching through an Array
23.Fill array by using a nested For- Next loop.
24.Referencing Elements in a Multi-dimensional Array
25.Convert number to String by using Array
26.Specifying the Index Range of an Array
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.