Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Good catch. It would work if the array were variant, but a string array in
initialized to "" for each element I believe. -- Regards, Tom Ogilvy "Dave Peterson" wrote in message ... I don't think this will work with string arrays: Dim myArray() As String ReDim myArray(1 To 5) MsgBox Application.CountA(myArray) I got 5 back in the msgbox. Bob Phillips wrote: Chris, You could try If Application.CountA(ary) 0 Then 'process it End If it will fail if there are strings or numbers. -- HTH RP (remove nothere from the email address if mailing direct) "Chris W." wrote in message ... Hi, I have a dynamic, zero-based, string array that I Redim often, and i want to know how do i test it to see if it actually has any elements in it before I put it thru the loop to extract the data. If I have no elements I want to exit before looping. Can I use IsEmpty to test a string Array or is it a "" value by default. I forget, and documentation is sparse on details. thank you -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Conditional Testing of an array | Excel Worksheet Functions | |||
Testing same cell across multiple sheets for a string and counting each instance? | Excel Worksheet Functions | |||
Passing a String in Array to Range as String | Excel Programming | |||
Fill an Array with String values | Excel Programming | |||
Variant Array with String Values - Type Mismatch | Excel Programming |