View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
SeekingMoSkills SeekingMoSkills is offline
external usenet poster
 
Posts: 3
Default How do you invoke the Let and Get class Functions

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





.