In this tutorial you will learn how to use the LBOUND Function.
The LBOUND Function returns a Long containing the smallest available subscript for the indicated dimension of an array.
=LBOUND( arrayname [, dimension ] )
arrayname Name of the array variable
dimension [Optional] Whole number indicating which dimension's upper bound is returned. Use 1 for the first dimension, 2 for the second, and so on. If dimension is omitted, 1 is assumed.
In this example we will work with an array of numbers: Numbers(1,2,3,4)
The result is 1.
FORM
In a Form you could set the Default Value of a Textbox to
=LBOUND(Numbers)
VBA
In a Form add a TEXTBOX control and rename it "txtLBound", then you could add the following in the Load Event.
Private Sub Form_Load()
txtLBound = LBOUND(Numbers)
End Sub
Course
Want to learn more? Request this via the contact form.
Search
You can find more about this by searching the website.