LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default Array Test

What does "proactively test an array for data" mean?

If the array is not dynamic it always exists in the sense that memory
is allocated to it.

If the non-dynamic array is not declared as variant all data elements
are initialized to something (yes, even object or string arrays:
Nothing for the former, zero length string for the latter)

For an array of type variant use IsEmpty(x(i))

For a dynamic array that has not been dimensioned with a redim
statement a error trap is mandatory. Maybe, you can explain why you'd
rather not use one...

Once a dynamic array is dimensioned, the same rules as in para 3 above
apply.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
Does anyone know how to proactively test an array for data prior to its use
without using an error event?

If not, what is a good error test?

I have been using 'Err.Number = 9' as a test to call the population routine.

Thanks,
VBA Dabbler



 
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
Calculate mean of test scores from rows of test answers RiotLoadTime Excel Discussion (Misc queries) 1 July 26th 06 05:14 PM
logical test, array, text and numbers Dan M. Excel Worksheet Functions 1 April 25th 06 08:56 AM
Test for end of array of objects? peter Excel Programming 8 February 3rd 05 09:15 AM
Test for Single Character That is in an Array scallyte Excel Worksheet Functions 2 November 11th 04 04:47 PM


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