Results 1 to 3 of 3

Thread: Set and Let Property????

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2001
    Location
    Philippines
    Posts
    3

    Question 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...

  2. #2
    Hyperactive Member FATBOYPEE's Avatar
    Join Date
    May 2001
    Location
    Charleville (Ireland) Still. ANYONE GOT A JOB I CAN HAVE ? GIZA JOB. I CAN DO THAT....
    Posts
    463
    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.....

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2001
    Location
    Philippines
    Posts
    3

    Thumbs up Thanks!!!!!

    That was a great help!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width