Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default Property Let / Get Statements

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default Property Let / Get Statements

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.

On Tue, 19 Oct 2004 08:35:02 -0700, "John"
wrote:

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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IF Statements (Mutliple Statements) Deezel Excel Worksheet Functions 3 October 19th 06 06:13 AM
Runtime error 380: Could not set the List property. invalid property value of listbox jasgrand Excel Programming 0 October 6th 04 09:28 PM
Is there a Filename property in PrintOut property Christian[_6_] Excel Programming 4 September 3rd 04 10:12 PM
xls property 71marco71[_12_] Excel Programming 1 February 13th 04 01:02 AM
Property Set Bob Phillips[_6_] Excel Programming 0 February 4th 04 09:24 PM


All times are GMT +1. The time now is 12:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"