Getting a returned array

Arrays returned by Domino® properties and methods must be defined as Variant. You cannot define the return variable as a dynamic array. For example, you can do:

views = db.Views
Forall view In views

Or:

Dim views as Variant
views = db.Views
Forall view In views

But not:

Dim views() as NotesView
views = db.Views
Forall view In views

In general, for performance reasons, consider placing a returned array in a variable before accessing its elements, especially if you are using a Forall loop. For example, try:

views = db.Views
Forall view In views

Instead of:

Forall view In db.Views