We help IT Professionals succeed at work.
Get Started

VB6: How do I detect if an array is empty?

greendot asked
Last Modified: 2008-02-01
I have a type with a bunch of string arrays in it like so (shortened for viewing pleasure):

Private Type TCriteria
    provider() As String
End Type

Then, various strings are passed to me and I use the Split command to parse them out and put the results into these arrays.

So, depending on the strings passed to me, I will load up anywhere from none to all of the arrays.

Is there a way to tell if one of these arrays has NOT been loaded up yet?

I've tried IsEmpty() IsNull() and they only work on Variants.

Any attempt to reference this array gives a "subscript out of range" error.

any hints?

Watch Question
This problem has been solved!
Unlock 1 Answer and 8 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE