LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
baj baj is offline
external usenet poster
 
Posts: 24
Default How to view the dimension of an open array in VBA ?

Hi All,
Suppose you create an open array (1 dimension) :
Dim arr() as String

Then functions like Ubound(arr) or Lbound(arr) will give an error on
the subscript...

With which function or method is it possible to know if the array arr
has got some dimensions or not ?
I want to know this because I want enlarge the array when I need it...
that's not diffcult with the combination 'Preserve Redim' but I have to
know the starting point...

If arr() has just been dimensioned and you want to add 3 elements then
you have to Redim arr(3),
But when arr() has already 5 elements you have to say Preserve Redim
arr(8)

One should expect you can check this dimension with Ubound or LBound...
but this isn't the case if the dimension is actualy not existing...

How, How ?

TXS for any help

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mutli-dimensional Array to Single-Dimension Array Blue Aardvark Excel Programming 3 October 15th 05 09:22 AM
Array transfer - 1 dimension v. 2 dimension JWolf[_2_] Excel Programming 2 June 29th 04 01:02 AM
Getting excel array dimension banavas[_3_] Excel Programming 3 June 8th 04 12:11 PM
Applying Sum Function to 2nd Dimension of Array ExcelMonkey[_36_] Excel Programming 2 January 28th 04 05:48 PM
single dimension array RobcPettit Excel Programming 3 January 20th 04 08:33 AM


All times are GMT +1. The time now is 11:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"