Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 834
Default How do you invoke the Let and Get class Functions

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
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
What does it take to get class functions to execute? OfficeUser Excel Programming 1 February 11th 08 06:03 PM
Class programming - how to return chartobject from a class? [email protected] Excel Programming 3 October 11th 06 12:07 PM
Class modules: parametrize class object fields Jean-Pierre Bidon Excel Programming 11 August 31st 06 02:49 PM
Passing Custom Class Variables through Functions Xiazer[_13_] Excel Programming 2 May 19th 06 05:34 PM
class functions TheIrishThug[_16_] Excel Programming 3 December 31st 05 04:16 PM


All times are GMT +1. The time now is 04:18 AM.

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"