Thanks you Bill, matching the order in the calling sub proved successful.However I am still receiving the error in myArray function ‘FORALL alias variable previously declared: q’ and I’m not quite sure where to look. Thanks
Function myArray(item As NotesItem, whom() As String, x As Integer, q As Variant)
Subject: You can not re-use q as a variable in your forall loop.
After looking at your function, I can not see why you are passing x and q as parameters at all. I also do not see why you have declared it as a Function and not a Sub.
Sub myArray(item As NotesItem, whom() As String)
x = Ubound(whom)
Forall q In item.Values
x = x + 1
Redim Preserve whom(x)
whom(x) = q
End Forall
End Sub
However in R6 there is a nice ArrayAppend function built in.