How to Pass an array of implement(ed) object(s) to a sub/function?
Code:
Class - NamedData
public property get Name() as string
end property
public property let Name(value as string)
end property
Class - ProperName
implements NamedData
private Name as string
private property get NamedData_Name() as string
NamedData_Name = Name
end property
private property let Name(value as string)
Name = value
end property
public property get Name() as string
Name = NamedData_Name
end property
public property let Name(value as string)
NameData_Name = value
end property
ThisDocument
dim ProperNames(10) as new ProperName
dim sub xMain()
LoadNamedData(ProperNames) ' ByRef Argument Type Mismatch !!!
end sub
Sub LoadNamedData(oND() as NamedData)
' do stuff
end sub
Why am I getting the type mismatch when ProperNames is any array of NamedData (by way of implements)? This also doesn't work if it's not an array. But it does work if byval is used but only for non array.