Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Calculate mean of test scores from rows of test answers | Excel Discussion (Misc queries) | |||
logical test, array, text and numbers | Excel Worksheet Functions | |||
Test for end of array of objects? | Excel Programming | |||
Test for Single Character That is in an Array | Excel Worksheet Functions |