Results 1 to 26 of 26

Thread: *RESOLVED* Property Get and Let in a class module

  1. #1

    Thread Starter
    Addicted Member A.P.Gumby's Avatar
    Join Date
    Oct 2005
    Location
    Outside the assylum
    Posts
    147

    Resolved *RESOLVED* Property Get and Let in a class module

    Hi,

    Apologies up front if my use of terminology is incorrect but ...

    It is my understanding that when you declare properties in a class module you use Property Get (to read values) and Property Let (to write values) if the property is a standard variable type (boolean, integer etc).

    However, if the class member is an object (e.g. another class) you just use Get to both read and write.

    My question is how do you know whether the object class member is being accessed for read or write from within the Property Get code?

    Any help, as always, greatly appreciated.
    Last edited by A.P.Gumby; Sep 14th, 2006 at 05:54 AM. Reason: Resolved
    Using Visual Studio 2008.
    I am not young enough to know everything - Oscar Wilde

  2. #2
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Property Get and Let in a class module

    when working with objects you use Set:
    VB Code:
    1. ' In Class
    2. Private oFrm As Form
    3.  
    4. Public Property Get PassedForm() As Form
    5.     Set PassedForm = oFrm
    6. End Property
    7.  
    8. Public Property Set PassedForm(frm As Form)
    9.     Set oFrm = frm
    10.     Debug.Print oFrm.Name
    11. End Property
    12.  
    13. ' In Form1
    14. Private Sub Form_Load()
    15.     Dim cCls As New Class1
    16.    
    17.     Set cCls.PassedForm = Me
    18.     Debug.Print cCls.PassedForm.Name
    19. End Sub
    is that what you were getting at?

  3. #3
    Fanatic Member Dnereb's Avatar
    Join Date
    Aug 2005
    Location
    Netherlands
    Posts
    863

    Re: Property Get and Let in a class module

    The Get propperty is for reading data from the class to the calling code
    the let/set to write someting into a class variable.
    Doing a read an write at once can happen because the argument is passed byreference.

    If you want to write classes in VB6.0 I seriously recommend MZ-tools
    it will save you a lot of time, it's free an no I do not get anything out of reccomending this add-inn.
    Last edited by Dnereb; Sep 11th, 2006 at 10:33 AM.
    why can't programmers keep and 31 Oct and 25 dec apart. Why Rating is Useful
    for every question you ask provide an answer on another thread.

  4. #4

    Thread Starter
    Addicted Member A.P.Gumby's Avatar
    Join Date
    Oct 2005
    Location
    Outside the assylum
    Posts
    147

    Re: Property Get and Let in a class module

    Thanks for the reply,

    That is exactly what I am getting at.

    In my case the main class is a list of machine parameters which are of the type of a sub class.

    So for example my main class looks like :
    VB Code:
    1. Private mParameter1 As New MachineParameter
    2. Private mParameter2 As New MachineParameter
    3.  
    4. 'Parameter 1
    5. Public Property Get Parameter1() As MachineParameter
    6.     Set Parameter1 = mParameter1
    7. End Property
    8.  
    9. 'Parameter 2
    10. Public Property Get Parameter2() As MachineParameter
    11.     Set Parameter2 = mParameter2
    12. End Property

    And the MachineParameter class looks like :
    VB Code:
    1. Private mvDemand As Variant
    2. Private mvActual As Variant
    3.  
    4. 'Demand value.
    5. Public Property Get vDemand() As Variant
    6.     vDemand = mvDemand
    7. End Property
    8. Public Property Let vDemand(vNewValue As Variant)
    9.     mvDemand = vNewValue
    10. End Property
    11.  
    12. 'Actual value.
    13. Public Property Get vActual() As Variant
    14.     vActual = mvActual
    15. End Property
    16. Public Property Let vActual(vNewValue As Variant)
    17.     mvActual = vNewValue
    18. End Property

    What I need to know is how the Property Get in the main class is being acessed (i.e. is it going to access the property Get or Let in the sub class).
    Using Visual Studio 2008.
    I am not young enough to know everything - Oscar Wilde

  5. #5
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Property Get and Let in a class module

    Quote Originally Posted by A.P.Gumby
    What I need to know is how the Property Get in the main class is being acessed (i.e. is it going to access the property Get or Let in the sub class).
    i don't really understand what you mean when you use Set whatever = whatever it's just passing the object reference - the object you're passing won't be accessed.

  6. #6

    Thread Starter
    Addicted Member A.P.Gumby's Avatar
    Join Date
    Oct 2005
    Location
    Outside the assylum
    Posts
    147

    Re: Property Get and Let in a class module

    Thanks for sticking with me on this one.

    This is an ActiveX server project.

    When the parameters in the main class are being accessed by clients, the clients read the parameters using.

    MyLocalRecordOfParameter1 = Parameter1.vActual

    After executing any code within Public Property Get Parameter1, this will eventually cause any code within Public Property Get vActual to be executed.

    The clients can write to parameters by using

    Parameter1.vDemand = TheValueIWantItToBe

    After executing any code within Public Property Get Parameter1, this will eventually cause any code within Public Property Let vActual to be executed.

    In both cases the Public Property Get Parameter1 code is executed but depending on how the parameter is accessed, the Get or Let in the sub class ill be executed. I need to know how the Public Property Get Parameter1 is being accessed before I get to the sub class.
    Using Visual Studio 2008.
    I am not young enough to know everything - Oscar Wilde

  7. #7
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: Property Get and Let in a class module

    I don't think what you want to do is possible with your current structure. As it is now everything is Public, so there is no way to intercept the calls. In fact, it is possible to completely bypass the Property Get in the Main class.

    VB Code:
    1. 'in calling application
    2. Dim x as MachineParameter
    3.  
    4. Set x = MainClass.Parameter1
    5. 'the following line will not even use the main class
    6. x.vDemand = 12345

    The Parameter objects would need to be private in the Main Class. Create methods to get/let Parameter values, you would then know exactly which one properties are being referenced.

    VB Code:
    1. Private mParameter1 As New MachineParameter
    2. Private mParameter2 As New MachineParameter
    3.  
    4. 'Parameter 1
    5. 'Public Property Get Parameter1() As MachineParameter
    6. '    Set Parameter1 = mParameter1
    7. 'End Property
    8.  
    9. Public Property Get Parameter1Value() as Variant
    10.      Parameter1Value =  mParameter1.Value
    11. End Property
    12.  
    13. Public Property Let Parameter1Value(Byval NewValue as Variant)
    14.       mParameter1.Value = NewValue
    15. End Property

  8. #8

    Thread Starter
    Addicted Member A.P.Gumby's Avatar
    Join Date
    Oct 2005
    Location
    Outside the assylum
    Posts
    147

    Re: Property Get and Let in a class module

    Thanks for the reply,

    I will give that a try.
    Using Visual Studio 2008.
    I am not young enough to know everything - Oscar Wilde

  9. #9

    Thread Starter
    Addicted Member A.P.Gumby's Avatar
    Join Date
    Oct 2005
    Location
    Outside the assylum
    Posts
    147

    Re: Property Get and Let in a class module

    Still struggling with this.

    Each member of the main class has two properties .vDemand and .vActual There may be a need to add others in the future hence the use of the MachineParameter class module.

    What I need to do is intercept when a parameter is being written to.

    I was holding off adding this additional layer of complexity but ...
    I need to do this so that I can raise an event to the connected machine to tell it that a connected client has changed one of its parameters.

    Just putting the event raising code in the Property Let of the MachineParameter class does not always work properly since this code is only executed after the End Property of the Property Get in the main class and due to other events coming into the server, I cannot guarrantee that this is always the next piece of code to be executed.

    I appreciate your help brucevde ... You say that you don't think that what I am trying to do is possible with my current structure. Is that a definite?
    Using Visual Studio 2008.
    I am not young enough to know everything - Oscar Wilde

  10. #10
    PowerPoster
    Join Date
    May 2006
    Posts
    2,988

    Re: Property Get and Let in a class module

    ill take a go at this ..

    VB Code:
    1. Private mParameter As New MachineParameter
    2.  
    3. 'Parameter 1
    4. Public Property Get Parameter1() 'As MachineParameter
    5.     Set Parameter1 = mParameter.vDemand
    6. End Property
    7.  
    8. 'Parameter 2
    9. Public Property Get Parameter2() 'As MachineParameter
    10.     Set Parameter2 = mParameter.vActual
    11. End Property

    VB Code:
    1. Private mvDemand As Variant
    2. Private mvActual As Variant
    3.  
    4. 'Demand value.
    5. Public Property Get vDemand() 'As Variant
    6.     vDemand = mvDemand
    7. End Property
    8.  
    9. Public Property Let vDemand(vNewValue As Variant)
    10.     mvDemand = vNewValue
    11. End Property
    12.  
    13. 'Actual value.
    14. Public Property Get vActual() 'As Variant
    15.     vActual = mvActual
    16. End Property
    17.  
    18. Public Property Let vActual(vNewValue As Variant)
    19.     mvActual = vNewValue
    20. End Property

  11. #11

    Thread Starter
    Addicted Member A.P.Gumby's Avatar
    Join Date
    Oct 2005
    Location
    Outside the assylum
    Posts
    147

    Re: Property Get and Let in a class module

    Thanks for the reply rory.

    Each Parameter (Parameter1, Parameter2 etc) has the .vDemand and .vActual properties. which can be read or written to.

    I need to detect a write at the main class level.

    i.e.
    VB Code:
    1. Private mParameter1 As New MachineParameter
    2. Private mParameter2 As New MachineParameter
    3.  
    4. 'Parameter 1
    5. Public Property Get Parameter1() As MachineParameter
    6.     Set Parameter1 = mParameter1
    7. 'Was the parameter written to or read from?
    8. End Property
    9.  
    10. 'Parameter 2
    11. Public Property Get Parameter2() As MachineParameter
    12.     Set Parameter2 = mParameter2
    13. 'Was the parameter written to or read from?
    14. End Property
    Using Visual Studio 2008.
    I am not young enough to know everything - Oscar Wilde

  12. #12
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Property Get and Let in a class module

    how about raising an event in the sub-class then?

    Main Class:
    VB Code:
    1. Private WithEvents mParameter1 As MachineParameter
    2. Private WithEvents mParameter2 As MachineParameter
    3.  
    4. 'Parameter 1
    5. Public Property Get Parameter1() As MachineParameter
    6.     Set Parameter1 = mParameter1
    7. End Property
    8.  
    9. 'Parameter 2
    10. Public Property Get Parameter2() As MachineParameter
    11.     Set Parameter2 = mParameter2
    12. End Property
    13.  
    14. Private Sub mParameter1_Accessed(eCall As vbCallType)
    15.     Debug.Print eCall
    16. End Sub
    17.  
    18. Private Sub mParameter2_Accessed(ByVal eCall As vbCallType)
    19.     Debug.Print eCall
    20. End Sub
    MachineParameter Class:
    VB Code:
    1. Public Event Accessed(eCall As vbCallType)
    2.  
    3. Private mvDemand As Variant
    4. Private mvActual As Variant
    5.  
    6. ' Raise the Event before:
    7. Public Property Get vDemand() As Variant
    8.     RaiseEvent Accessed(vbGet)
    9.     vDemand = mvDemand
    10. End Property
    11.  
    12. Public Property Let vDemand(vNewValue As Variant)
    13.     RaiseEvent Accessed(vbLet)
    14.     mvDemand = vNewValue
    15. End Property
    16.  
    17. ' Raise the Event After:
    18. Public Property Get vActual() As Variant
    19.     vActual = mvActual
    20.     RaiseEvent Accessed(vbGet)
    21. End Property
    22.  
    23. Public Property Let vActual(vNewValue As Variant)
    24.     mvActual = vNewValue
    25.     RaiseEvent Accessed(vbLet)
    26. End Property
    and obviously you can modifiy the information returned by changing the parameters (mine was just a demo)

  13. #13
    Fanatic Member Dnereb's Avatar
    Join Date
    Aug 2005
    Location
    Netherlands
    Posts
    863

    Re: Property Get and Let in a class module

    In short if you write your class propper Get only reads en Let/Set only Writes
    (If you ommit the Byval argument and alter the values of the argument itself
    you can change the value of the variable in the calling code. I'v constructed a litle example to test reading and writing....with some remarks of course....

    Your MachineParameter class uses variants and if these aren't absolutly neccesary (i.o.w. storing a decimal) avoid them and use numeric, text or objects
    if you need to use several types consider writing diffrent classes for text,numbers and or objects
    Code:
    Private mvDemand As Variant
    Private mvActual As Variant
    
    Event Reading(PropertyName as String)
    Event Writing (Propertyame As String)
    
    'Demand value.
    Public Property Get vDemand() 'As Variant
        'this is reading only
        RaiseEvent Reading("vDemand")
        vDemand = mvDemand
    End Property
    
    Public Property Let vDemand(Byval vNewValue As Variant)
        'This is writing only
        RaiseEvent Writing("vDemand")
        mvDemand = vNewValue
    End Property
    
    'Actual value.
    Public Property Get vActual() 'As Variant
        'this is reading only
        RaiseEvent Reading("vActual")
        vActual = mvActual
    End Property
    
    Public Property Let vActual(ByVal vNewValue As Variant)
        'this is reading only
        RaiseEvent Writing("vActual")
        mvActual = vNewValue
    End Property

    In your machin class you are auto instancing.... don't it can cause memory leakage and unsuspected value's (Dim X as New Xobject)

    Code:
    Option Explicit
    
    Private WithEvents mParameter1 As MachineParameter
    Private WithEvents mParameter2 As MachineParameter
    
    Private Sub Class_Initialize()
    
    Set mParameter1 = New MachineParameter
    Set mParameter2 = New MachineParameter
    
    'maybe you want to set default values here?
    mParameter1.vActual = -1
    mParameter1.vDemand = -1
    mParameter2.vActual = -1
    mParameter2.vDemand = -1
    
    End Sub
    
    
    'Parameter 1
    Public Property Get Parameter1() As MachineParameter
        Set Parameter1 = mParameter1
    'Was the parameter written to or read from?
    End Property
    
    'Parameter 2
    Public Property Get Parameter2() As MachineParameter
        Set Parameter2 = mParameter2
    'Was the parameter written to or read from?
    End Property
    
    Private Sub Class_Terminate()
    'ensure memory is relaesed propperly
    Set mParameter1 = Nothing
    Set mParameter2 = Nothing
    
    End Sub
    
    Private Sub mParameter1_Reading(PropertyName As String)
    'Do something  parameter1 is read like
    msgbox "writing to : " & PropertyName
    
    End Sub
    
    Private Sub mParameter1_Writing(Propertyame As String)
    'Do something  parameter1 is written to like
    msgbox "writing to : " & PropertyName
    
    End Sub
    
    Private Sub mParameter2_Reading(PropertyName As String)
    'Do something  parameter2 is read like
    msgbox "writing to : " & PropertyName
    
    End Sub
    
    Private Sub mParameter2_Writing(Propertyame As String)
    'Do something  parameter2 is written to like
    msgbox "writing to : " & PropertyName
    End Sub
    The problem of changing argument values happens if you write a property like this:

    Code:
    Public Property Let vDemand(Byref vNewValue As Variant) '(byref is default for arguments in VB6.0)
        if isnumeric(vNewValue) and > 0 then vNewValue = cDbl(vNewvalue/2) 'this will alter the value given for vNewValue if it was stored in a variable
        mvDemand = vNewValue
       
    End Property
    I hope this will help
    Grmpppffffff Bushmobile types fast!
    why can't programmers keep and 31 Oct and 25 dec apart. Why Rating is Useful
    for every question you ask provide an answer on another thread.

  14. #14

    Thread Starter
    Addicted Member A.P.Gumby's Avatar
    Join Date
    Oct 2005
    Location
    Outside the assylum
    Posts
    147

    Re: Property Get and Let in a class module

    Thanks to both of you for continuing to help me with this one.

    In order to keep my initial question simple and not cloud it with stuff that I did not think was relevant, I confined my initial question to simply asking if it was possible to detect why the Property Get was called in the main class.

    I only need to raise the event if the .vDemand is changed and I am actually raising this event in the sub class.

    In order to do this I set a variable which identifies the parameter being accessed in the main class.
    VB Code:
    1. Private mParameter1 As New MachineParameter
    2. Private mParameter2 As New MachineParameter
    3.  
    4. 'Parameter 1
    5. Public Property Get Parameter1() As MachineParameter
    6.     iChangingParameterID = eParameterID.eParameter1
    7.     Set Parameter1 = mParameter1
    8. End Property
    9.  
    10. 'Parameter 2
    11. Public Property Get Parameter2() As MachineParameter
    12.     iChangingParameterID = eParameterID.eParameter2
    13.     Set Parameter2 = mParameter2
    14. End Property

    And then use this parameter ID to raise the event in the .vDemand Property Let in the sub class.
    VB Code:
    1. Private mvDemand As Variant
    2. Private mvActual As Variant
    3.  
    4. 'Demand value.
    5. Public Property Get vDemand() As Variant
    6.     vDemand = mvDemand
    7. End Property
    8. Public Property Let vDemand(vNewValue As Variant)
    9.     DoNotify neDemandChanged, byChangingMachineID, iChangingParameterID
    10.     mvDemand = vNewValue
    11. End Property
    12.  
    13. 'Actual value.
    14. Public Property Get vActual() As Variant
    15.     vActual = mvActual
    16. End Property
    17. Public Property Let vActual(vNewValue As Variant)
    18.     mvActual = vNewValue
    19. End Property

    The DoNotify bit raises the event and works OK.

    The problem is that I find that the sub class Property Let code is not always called immediately after the main class Property Get code.
    There are a number of clients connected to the server. If another client has, say, initiated a read of Parameter2 (i.e. it wants to know the .vActual) while the Property Get Parameter1 code is being executed for a write of Parameter1 (i.e. the vDemand is being written) by another client, the iChangingParameterID has changed before the sub class code for the Property Let is executed.

    Dnereb ...
    I am using variants because the data can be anything
    I also take your point about auto instancing. I don't think that that will be causing the problem that I am seeing but I will tidy it up anyway.
    Using Visual Studio 2008.
    I am not young enough to know everything - Oscar Wilde

  15. #15
    Fanatic Member Dnereb's Avatar
    Join Date
    Aug 2005
    Location
    Netherlands
    Posts
    863

    Re: Property Get and Let in a class module

    Is it a solution to block new actions while you are waiting for a Let after a get?
    You could use a boolean InUse to determine if your class is open for changes or needs to reject new alterations or readouts. But I suspect I'm thinking way to simplistic.

    BTW I didn't think the removal of autoinstancing would solve this problem, just possible problems in the future.
    why can't programmers keep and 31 Oct and 25 dec apart. Why Rating is Useful
    for every question you ask provide an answer on another thread.

  16. #16

    Thread Starter
    Addicted Member A.P.Gumby's Avatar
    Join Date
    Oct 2005
    Location
    Outside the assylum
    Posts
    147

    Re: Property Get and Let in a class module

    Thanks for coming back on this Dnereb,

    The temporary solution that I have implemented is to do just what you suggest. (i.e. block changes while updates are in progress).

    This at least stops the wrong parameter change event from being fired but does slow things down a bit.

    I really would like to find a proper solution to this problem though.
    If only there were some way of forcing the sub class code to execute immediately after the main class Property Get has executed
    Using Visual Studio 2008.
    I am not young enough to know everything - Oscar Wilde

  17. #17
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: Property Get and Let in a class module

    the iChangingParameterID has changed before the sub class code for the Property Let is executed.
    If the iChangingParameterID variable is declared Public in a module all clients are reading/updating the same variable. Make it a Friend Property of the Parameter class.

    VB Code:
    1. Private mvDemand As Variant
    2. Private mvActual As Variant
    3. Private mlngChangingParameterId as Long
    4.  
    5. Friend Property Get ChangingParameterId() as Long
    6.      ChangingParameterId = mlngChangingParameterId
    7. End Property
    8.  
    9. Friend Property Let ChangingParameterId(ByVal ParameterId as Long )
    10.      mlngChangingParameterId = ParameterId
    11. End Property
    12.  
    13. 'Demand value.
    14. Public Property Get vDemand() As Variant
    15.     vDemand = mvDemand
    16. End Property
    17. Public Property Let vDemand(vNewValue As Variant)
    18.     DoNotify neDemandChanged, byChangingMachineID, mlngChangingParameterId
    19.     mvDemand = vNewValue
    20. End Property
    21.  
    22. 'main class
    23. Public Property Get Parameter1() As MachineParameter
    24.     mParameter1.ChangingParameterId = eParameterID.eParameter1
    25.     Set Parameter1 = mParameter1
    26. End Property

  18. #18

    Thread Starter
    Addicted Member A.P.Gumby's Avatar
    Join Date
    Oct 2005
    Location
    Outside the assylum
    Posts
    147

    Re: Property Get and Let in a class module

    Thanks for the suggestion brucevde,

    The ChangingParameterID is indeed used by other classes in the project. This is just one small bit of the application. However, the sub class containing the .vActual and .vDemand properties is also used by other parameter classes.

    I think that the fundamental mistake that I have made is to assume that the sub class code would be called from within the main class Property Get i.e. Set Parameter1 = mParameter1.
    It appears that the sub class code is not executed until after the End Property.

    Unless someone can come up with a miracle, it looks like I am going to have to restructure this big time
    Using Visual Studio 2008.
    I am not young enough to know everything - Oscar Wilde

  19. #19
    Fanatic Member Dnereb's Avatar
    Join Date
    Aug 2005
    Location
    Netherlands
    Posts
    863

    Re: Property Get and Let in a class module

    Just out of curiosity what happens if you write it like this:

    'Parameter 1
    Public Property Get Parameter1() As MachineParameter
    iChangingParameterID = eParameterID.eParameter1
    Set Parameter1.vDemand = mParameter1.vDemand
    Set Parameter1.vActual = mParameter1.vActual
    End Property

    Thus calling the actual propperty's instead of setting a reference to the object

    Hope it helps...
    why can't programmers keep and 31 Oct and 25 dec apart. Why Rating is Useful
    for every question you ask provide an answer on another thread.

  20. #20

    Thread Starter
    Addicted Member A.P.Gumby's Avatar
    Join Date
    Oct 2005
    Location
    Outside the assylum
    Posts
    147

    Re: Property Get and Let in a class module

    Thanks for the thought.

    Tried that yesterday.
    Gives RTE 91 "Object variable with block variable not set"
    Using Visual Studio 2008.
    I am not young enough to know everything - Oscar Wilde

  21. #21
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: Property Get and Let in a class module

    Unless someone can come up with a miracle, it looks like I am going to have to restructure this big time
    Using Friend and adding properties to the Parameter class to identify the Main class seems like it could work...

  22. #22

    Thread Starter
    Addicted Member A.P.Gumby's Avatar
    Join Date
    Oct 2005
    Location
    Outside the assylum
    Posts
    147

    Re: Property Get and Let in a class module

    Thanks brucevde I will give that a go.

    I didn't think that it would work because there are other classes (other than the one that I have been calling the main class for the purposes of explaining the problem) that use the machine parameter sub class.

    Too late to try today ... It's supermarket night

    Will give it a go tomorrow
    Using Visual Studio 2008.
    I am not young enough to know everything - Oscar Wilde

  23. #23
    Fanatic Member Dnereb's Avatar
    Join Date
    Aug 2005
    Location
    Netherlands
    Posts
    863

    Re: Property Get and Let in a class module

    Quote Originally Posted by A.P.Gumby
    Thanks for the thought.

    Tried that yesterday.
    Gives RTE 91 "Object variable with block variable not set"
    that seems to be a initialisation issue did you set the mParameter1
    Set parmeter1 = New machine parameter

    before you called it (ergo did you do that in the initiale event of the main class?)
    why can't programmers keep and 31 Oct and 25 dec apart. Why Rating is Useful
    for every question you ask provide an answer on another thread.

  24. #24

    Thread Starter
    Addicted Member A.P.Gumby's Avatar
    Join Date
    Oct 2005
    Location
    Outside the assylum
    Posts
    147

    Re: Property Get and Let in a class module

    No, I am still auto instancing.
    I will try that.
    Using Visual Studio 2008.
    I am not young enough to know everything - Oscar Wilde

  25. #25

    Thread Starter
    Addicted Member A.P.Gumby's Avatar
    Join Date
    Oct 2005
    Location
    Outside the assylum
    Posts
    147

    Re: Property Get and Let in a class module

    Tried that, still getting RTE 91.

    I'm going to give brucevdes Friend property idea another go.
    Using Visual Studio 2008.
    I am not young enough to know everything - Oscar Wilde

  26. #26

    Thread Starter
    Addicted Member A.P.Gumby's Avatar
    Join Date
    Oct 2005
    Location
    Outside the assylum
    Posts
    147

    Re: Property Get and Let in a class module

    brucevdes suggestion of adding a friend property to the parameter class worked.

    A big thanks to you and all others who helped me on this one.
    Using Visual Studio 2008.
    I am not young enough to know everything - Oscar Wilde

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