Vba length of an array in Excel

In Excel VBA a Question frequently asked is how do you know the length of an array

Answer:

Use the UBound(array) expression

(for formulas, depending on your country, you might have to change ; with , or the opposite

 Other excel answers

 

 

You can find similar Excel Questions and Answer hereunder

1) How to hide and unhide rows and columns in excel VBA

2) How to code more simply in VBA. Use of Keywords is helping a lot

3) How can I turn off Alerts using VBA?

4) How can I copy and rename a WorkSheet using VBA?

5) Vba to return week numbers in Excel

6) How can I hide Formula Bar and Headings using VBA?

7) How can I set the Source Data of charts using VBA?

8) How to read a value from a cell in vba in Excel

9) How can I get input from user through a prompt and assign user's input to a cell?

10) How can I export a chart as a gif file?

 

Here the previous and next chapter