|
-
May 17th, 2001, 02:48 AM
#1
Thread Starter
New Member
Set and Let Property????
Hi guys! Can anyone please explain me the difference between the two? Sorry, I'm a newbie here and my question might sound stupid to you but hey! It's better to ask that to assume...
-
May 17th, 2001, 04:38 AM
#2
Hyperactive Member
The property settings Let & Get
are commonly used to interface any variables that are not objects (ie Integer Long, String etc). You need 3 things for Read & Write:
a Let property to put your data in
A Get property to Get your data out
and a private container of the same type you Let & Get:
' Declaration of Private Data Container used for anything but objects
Private m_MysTring as String
' Public interface to place data variables (anything but objects)
Public Property Let myString(byval sMyString as String)
' Place any manipulation code also in here
m_MsyString = sMyString
End Property
Public Property Get MyString() as String
' Place any other manipulation code in here.
MyString = m_MysTring
End Property
Set on the other hand is for objects: Typically you need 3 things
' Private Variable Container
Private m_ADODBRS as ADODB.RecordSet
' Set Property
Public Property Set ADODBRS (ARS as ADODB.RecordSet)
Set m_ADODBRS = ARS
End Property
' Get Property
Public Property Get ADODBRS() as ADODB.RecordSet
Set ADODBRS = m_ADODBRS
End Property
FATBOYPEE

Best Bar.....
-
May 17th, 2001, 04:44 AM
#3
Thread Starter
New Member
Thanks!!!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|