LBound Function

๋ฐฐ์—ด์˜ ์ตœ์ € ํ•œ๋„๋ฅผ ๊ตฌํ•ฉ๋‹ˆ๋‹ค.

Syntax:


LBound (ArrayName [, Dimension])

Return value:

Long

Parameters:

ArrayName: ๋ฐฐ์—ด ์ฐจ์›์˜ ์ตœ๊ณ (Ubound) ๋˜๋Š” ์ตœ์ €(LBound) ํ•œ๋„๋ฅผ ๊ตฌํ•  ๋ฐฐ์—ด์˜ ์ด๋ฆ„์ž…๋‹ˆ๋‹ค.

[Dimension]: ์ตœ๊ณ (Ubound) ๋˜๋Š” ์ตœ์ €(LBound) ํ•œ๋„๋ฅผ ๊ตฌํ•  ์ฐจ์›์„ ์ง€์ •ํ•˜๋Š” ์ •์ˆ˜์ž…๋‹ˆ๋‹ค. ๊ฐ’์„ ์ง€์ •ํ•˜์ง€ ์•Š์„ ๊ฒฝ์šฐ ์ฒซ ๋ฒˆ์งธ ์ฐจ์›์ด ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.

Error codes:

5 ์ž˜๋ชป๋œ ํ”„๋กœ์‹œ์ € ํ˜ธ์ถœ์ž…๋‹ˆ๋‹ค.

9 ๋ฒ”์œ„๋ฅผ ๋ฒ—์–ด๋‚œ ์•„๋ž˜ ์ฒจ์ž์ž…๋‹ˆ๋‹ค.

Example:


Sub VectorBounds
    Dim v(10 To 20) As String
    Print LBound(v()) ' returns 10
    Print UBound(v) ' returns 20
End Sub ' VectorBounds
 
Sub TableBounds
    Dim t(10 To 20,-5 To 70) As Currency
    Print LBound(t), UBound(t()) ' returns 10  20
    Print LBound(t(),2) ' returns - 5
    Print UBound(t,2) ' returns 70
End Sub ' TableBounds

Please support us!