VBS TUTORIAL: function-ubound function _vbs

Source: Internet
Author: User
Tags naming convention

UBound function

Returns the maximum number of available subscripts for the specified array dimension.

UBound(arrayname[, dimension])



Required option. The name of the array variable, followed by the standard variable naming convention.


Options available. An integer that specifies which dimension upper bound is returned. 1 represents the first dimension, 2 represents the second dimension, and so on. If the dimension argument is omitted, the default value is 1.


The UBound function is used in conjunction with the LBound function to determine the size of the array. You can use the LBound function to determine the lower bound of one dimension of an array.

The lower bounds of all dimensions are 0. For arrays with such dimensions, theUBound function returns the following result:

Dim A(100,3,4)
Statement return value
UBound (A, 1) 100
UBound (A, 2) 3
UBound (A, 3) 4

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.