Property Let / Get Statements

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible to store arrays in property prpcedures? Specifically -
array's of unknown size?

I tried using ParamArray, but it won't compile (even though MS Help says you
can use it):
-----------------------------------------------------------------------------
Public Property Let FileNames(ParamArray vNewValue() As Variant)
....
End Property
-----------------------------------------------------------------------------
I also tried:
Public Property Let FileNames(ByRef vNewValue() As Variant)
....
End Property

John
 
With ParamArray, you would have to list each and every one of the elements of
the array in your assignment statement, i.e. something like this:

FileNames = "Text1", "Text2", "Text3"

In looking at the data types which can be used with Property Let, I don't see
arrays mentioned. But I expect it will work if you store your array in a
variant or user-defined type. That said, I couldn't get it to work with a UDT,
but the variant worked.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top