![]() |
length of an array
is there any command (like in java) which gives you the length of an array?
|
length of an array
Lookup UBound in the VBA help.
Dim Arr(1 to 100) as String MsgBox UBound(Arr) This will give 100 RBS "april27" wrote in message ... is there any command (like in java) which gives you the length of an array? |
length of an array
Use
UBound(Arr) - LBound(Arr) + 1 in case it doesn't start at 1. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "RB Smissaert" wrote in message ... Lookup UBound in the VBA help. Dim Arr(1 to 100) as String MsgBox UBound(Arr) This will give 100 RBS "april27" wrote in message ... is there any command (like in java) which gives you the length of an array? |
length of an array
a more general determination for a single dimension:
Dimensionsize = Ubound(a) - lbound(a) + 1 -- Regards, Tom Ogilvy "RB Smissaert" wrote: Lookup UBound in the VBA help. Dim Arr(1 to 100) as String MsgBox UBound(Arr) This will give 100 RBS "april27" wrote in message ... is there any command (like in java) which gives you the length of an array? |
All times are GMT +1. The time now is 12:08 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com