Read Only

It is very common to have read-only properties but not write-only.
A large number of the properties are typically read-only.


This property only has a Property Get (no Property Let) which means that it is read-only.

Public Property Get Property_NormalHours() As Double 
   Property_NormalHours = field_dbNormalHours
End Property

This property only has a Property Get (no Property Let) which means that it is read-only.

Public Property Get Property_OvertimeHours() As Double 
   Property_OvertimeHours = field_dbOvertimeHours
End Property

A lot of the object model classes contain a lot of properties that cannot be set.
If a property cannot be set, it is read-only as opposed to read-write).
Many properties have built in constants that should be used for their values.


Using a Function Instead

You can create functions that can be treated like a read-only property



© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext