VBA Array LBound Function in Excel. Let us see about VBA arrays lower bound or LBound function in Excel VBA. The LBound function represents the lower bound value of an array. It returns the smallest subscript(Index) value of specified array. It helps to determine the existing an array starting size.
Here is the Syntax of the LBound Function in Excel VBA.
Where ArrayName: It is a mandatory argument. The ArrayName argument represents the name of an array.
Dimension: It is an optional parameter. The Dimension argument represents the dimension of an array.
Let us see the example for VBA lower bound function in Excel.
'VBA LBound Function Sub VBA_LBound_Function() 'Declare an array variable Dim aNEWS As Variant 'Define an Array values sWeekDays = Array("North", "East", "West", "South") 'Find Array Lower Bound MsgBox "Array Lower Bound Value is :" & LBound(sWeekDays), vbInformation, "VBAF1" End Sub
Here is the output screen shot of above macro.
You can refer the following link for the step by step instructions.
Click on the following links of the useful resources. These helps to learn and gain more knowledge.