If you know at coding time how deep your jagged arrays are, you can simply use nested loops. See Hans Passant answer for an example of that.
If you don't, you can rely on a type check and recursion. There are various solution, here is a simple one. Sorry I'm writing C# code because without a compiler at hand my VB.NET is a bit flaky; I'm sure you'll get the idea and convert the code easily.
public static IEnumerable Flatten(this IEnumerable source)
{
foreach (object item in source)
{
if (item is IEnumerable)
{
foreach (object item2 in Flatten((IEnumerable)item))
yield return item2;
}
else
yield return item;
}
}
This code is pretty generic in that it handles any kind of IEnumerable. You can be more restrictive in your checks and accept arrays of a specific type only. This might be important if you expect your arrays to contains list or other IEnumerable|s that you don't want to flatten.
Now just iterate:
For Each x In Flatten(myArray)
' Do something with x
Next For