Can Anyone Explain...

loGin
08-31-2003, 10:48 PM
can anyone explain Property Get and Property Let?

OnErr0r
08-31-2003, 10:52 PM
They're used in classes typically, but can be used in modules as well. Consider using the text property of a textbox and a string. When you read the .text from the textbox that's a Get. When you write text to the .text property its a Let.

So, internally, the textbox has a property like this:


Dim m_sText As String ' persists the text of the textbox

Public Property Get Text() As String
Text = m_sText
End Property

Public Property Let Text(ByVal sText As String)
m_sText = sText
End Property


edit: correct typo

loGin
08-31-2003, 10:58 PM
thanks alot man

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum