Hi,

This is a basic post and I apologize but I am struggling with setting my LET property in my class module I am building.

Assume the context is a User class where i can read and write the status of user's (online or offline).

If user is online, property = true, else false

Problem is, I need to pass a string variable to this property during runtime to obviously tell the class WHICH user I want to let/get.

Property GET works fine...


'Public Variables:
Public username As String
Public userpass As String

'Private Variables:
Private vOnline As Boolean




Property Get Online(username As String) As Boolean

 executesomecode
    If executesomecode = True Then Online = True

End Property

However, LET does not work. I need to pass the username from module code to the property...


Property Let Online(username As String)
    
ExecuteSomeCodeUsingUsernameString

    
End Property

And obviously I want to use these properties as such....

Dim user as new userclass

With user

If .Online("Richard") = False then
     .Online("Richard") = True
End if
 End with








P.S. I dont want to use a function/sub (Method) for this.


I am missing code in the LET property but nothing works. GET properties actually make sense--how the code is written with the variables and the property itself.... LET properties are just confusing.

Thanks for your patience and time.

Regards,