LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 618
Default using arrays in vba

Hi All

trying to come to grips with arrays ... i have the situation where i am
getting users to enter up to 60 numbers in a userform, i then need to use
these numbers in lots of different ways. So i have declared an array and i
populate it by cycling through the controls etc (all this works fine).
However, when i Dimmed the array i nominated the number of elements ..
Dim pipes(59) as long

but, of course if they don't enter 60 elements the array is too big. Now i
know that i could count the number of items (prior to populating the array)
and use the redim statement to set the size, but this seems like a bit of a
waste of time ... i've tried redim preserve after populating the array but
get told that the array has already been something or other (sorry not in
front of the screen and can't remember the exact wording).

what i would like to do is define & populate the array in the most efficient
way possible ... and would welcome any suggestions.

Regards
JulieD


 
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
Regarding the Arrays Raj Excel Discussion (Misc queries) 1 December 10th 08 02:26 PM
Use of arrays Dave F Excel Worksheet Functions 0 November 30th 06 04:26 PM
Arrays JAmes L Excel Programming 3 April 21st 04 11:00 AM
Arrays Aaron Cooper Excel Programming 2 April 14th 04 07:42 PM
arrays again RobcPettit Excel Programming 3 January 24th 04 10:33 PM


All times are GMT +1. The time now is 08:53 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"