Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
They are not called by name as they are properties not methods (they are not
functions), so you read/write from/to them. Properties are attributes of an object (class), and the Let/Get construct is the interface for those properties between the code that creates that object and the code in the class that maintains that object. Methods are the way that the object does things, or has things done to it (such as calculating a runtime). HTH Bob "SeekingMoSkills" wrote in message ... Thanks for the post Bob. So if I understand this correctly the Get and Let functions are never called by name but they need to be there to load or retrieve the values. Is that a correct statement? "Bob Phillips" wrote: Something like Set myClass = New clsBus With myClass .BusPart =23.5 .StartIme = #25/10/2009# .Index = 7 MsgBox "Buspart: " & .BusPart & ", Startime: " & .StartTime & ".INdex: " & .Index End With HTH Bob "SeekingMoSkills" wrote in message ... I have create classes with the Let and Get functions and now I would like to use these functions to store and retrieve data in the class which will then be put into a collection. Here is the class functions: Private pBusPart As Double Private pStartTime As Date Private pIndex As Integer '''''''''''''''''''''' ' BusPart property '''''''''''''''''''''' Public Property Get BusPart() As Double BusPart = pBusPart End Property Public Property Let BusPart(Value As Double) pBusPart = Value End Property '''''''''''''''''''''' ' StartTime property '''''''''''''''''''''' Public Property Get StartTime() As Date StartTime = pStartTime End Property Public Property Let StartTime(Value As Date) StartTime = Value End Property '''''''''''''''''''''' ' Index property '''''''''''''''''''''' Public Property Get Index() As Integer Index = pIndex End Property Public Property Let Index(Value As Integer) pIndex = Index End Property . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
What does it take to get class functions to execute? | Excel Programming | |||
Class programming - how to return chartobject from a class? | Excel Programming | |||
Class modules: parametrize class object fields | Excel Programming | |||
Passing Custom Class Variables through Functions | Excel Programming | |||
class functions | Excel Programming |