Status Flags are Boolean Variables with good names.
Private pIsAllowedRead As Boolean
Private pIsAllowedEdit As Boolean
'Read Only Properties
Public Property Get IsAllowedRead() AS Boolean
IsAllowedRead = pIsAllowedRead
End Property
'Write Only Properties
Public Property Let IsAllowedRead(IsUserAllowedToSeeSheet As Boolean)
pIsAllowedRead = IsUserAllowedToSeeSheet
End Property
When a Read Only and a Write Only Properties have the same name, that Property is Read/Write
Property Variables always start with a "p" for Property in my code. Others use "m" for Module.
Property Sub Names are what your code in other places use to get and set the Property Values
The Let Sub Parameter Name is what the coder sees as a tool tip when they write the Property name in his other code
Excel Objects like Worksheets and Charts have two names. The Tab name, or just "Name." is the one used in Formulas on the sheet.
VBA Code can use the Tab name like
Sheets("Sheet1").Range("A1")
Or, the Code can use the Sheet's CodeName like
You can change the Sheet's CodeName in the VBA Project Explorer.
If your UserForm wants to access a Flag in Sheet1, it merely uses the CodeName and the Property Name
'Read the Property
Dim X as Boolean
X = Sheet1.IsAllowedRead
'Write or set the Property
Sheet1.IsAllowedRead = True
'or a condition
Sheet1.IsAllowedRead = IsGoodName * IsGoodPassWord
'Multiplying Booleans is the same as ANDing Them
'Adding Booleans is the same as ORing them.