Property as an array

bruno.trudo

Board Regular
Joined
Jan 14, 2004
Messages
98
Hi guys,
is it possible property of an object (class) to be an array?
Or is it possible to index a property?
Thanks
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Ok,
I have a local array of a defined type in my class and I would like to allow access to its values for user through the property of this class.
Code:
Private Type AdfPoint
    PID As String
    Xact As String
    Xdes As String
    Yact As String
    Ydes As String
    Zact As String
    Zdes As String
    Note As String
End Type
This is the class type of each item in array and next should be the external one:
Code:
Public Type AdfPointExternal
    PID As String
    Xact As Variant
    Xdes As Variant
    Yact As Variant
    Ydes As Variant
    Zact As Variant
    Zdes As Variant
    Note As String
End Type
which I have declared in a module.
I have a variable in class
Code:
Private AdfPoints() As AdfPoint
where are data stored and I would like to use this property in this way
(I suppose a property called i.e. Point)
object.Point(index) = some AdfPoint
some AdfPoint = object.Point(index)

But I can´t pass it using
Public Propery Get, Let Point(?)
Is that possible?

Thanks
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,861
Members
449,052
Latest member
Fuddy_Duddy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top