Friend Example

When placed in a class module, the following code makes the member variable dblBalance accessible to all users of the class within the project. Any user of the class can get the value; only code within the project can assign a value to that variable.

Private dblBalance As Double

Public Property Get Balance() As Double
    Balance = dblBalance
End Property

Friend Property Let Balance(dblNewBalance As Double)
    dblBalance = dblNewBalance
End Property