Evidently I have not been properly instantiating UserForms; working directly on the class instead of with an instance. e.g.,
With cptStatusSheet_frm
...
End With
Modeless UserForms are not properly hidden/unloaded.
Modal UserForms are not properly hidden/unloaded.
UserForms are not always properly unloaded from memory.
QueryClose is unused.
Solutions:
[x] 1. Properly instantiate.
Set myStatusSheet_frm = New cptStatusSheet_frm
With myStatusSheet_frm
...
End With
[x] 2. With ([UserForm].Show 0 '0 = False = VBA.FormShowConstants.vbModeless): use Me.Hide within form's code; use Unload Me in UserForm_Terminate Event.
[x] 3. With ([UserForm].Show 1 '1 = True = VBA.FormShowConstants.vbModal): use Me.Hide within form's code; use Unload from the calling module.
[x] 4. In both instances, the UserForm should be cleared from memory (Set [UserForm] = Nothing) unless the calling subroutine needs it again (hint: if the subroutine has a (ByRef [myUserForm] As [cptUserForm]) variable, then do not kill it).
[x] 5. If CloseMode = vbQueryClose.vbFormControlMenu Then / Me.Hide / Cancel = True / End IF
UserForms subject to this change:
[x] cptAbout_frm
[x] cptAdjustment_frm
[x] cptAgeDates_frm
[x] cptBackbone_frm
[x] cptCalendarExceptions_frm
[x] cptCostRateTables_frm
[x] cptDataDictionary_frm
[x] cptDECM_frm
[x] cptDECMTargetUID_frm
[x] cptDynamicFilter_frm
[x] cptFilterByClipboard_frm
[x] cptFiscal_frm
[x] cptIntegration_frm
[x] cptMetricsData_frm
[x] cptNetworkBrowser_frm
[x] cptQBD_frm pre-release
[x] cptResetAll_frm
[x] cptResourceDemand_frm
[x] cptSaveLocal_frm
[x] cptSaveMarked_frm
[x] cptSettings_frm
[x] cptSmartDuration_frm
[x] cptStatusSheet_frm
[x] cptStatusSheetImport_frm
[x] cptTaskHistory_frm
[x] cptText_frm
[x] cptUpgrades_frm
Todo:
[x] assign this issue
[x] label the issue for enhancement or bug
[x] label the issue with codemodule (so fixes can be aggregated and hotfixed together)
[x] checkout appropriate branch and create topic branch
[x] design, code and test
[ ] update codemodule x.y.z
[ ] update CurrentVersions.xml manually
[ ] commit changes prefix comment with Issue #XXX -
[ ] merge topic into appropriate branch(es) and push
Problems:
QueryClose
is unused.Solutions:
[UserForm].Show 0 '0 = False = VBA.FormShowConstants.vbModeless
): useMe.Hide
within form's code; useUnload Me
inUserForm_Terminate
Event.[UserForm].Show 1 '1 = True = VBA.FormShowConstants.vbModal
): useMe.Hide
within form's code; useUnload
from the calling module.Set [UserForm] = Nothing
) unless the calling subroutine needs it again (hint: if the subroutine has a(ByRef [myUserForm] As [cptUserForm])
variable, then do not kill it).If CloseMode = vbQueryClose.vbFormControlMenu Then / Me.Hide / Cancel = True / End IF
UserForms subject to this change:
pre-release
Todo:
topic
branchIssue #XXX -
topic
into appropriate branch(es) and push