Attribute VB_Name = "modWindowListRoutines" Option Explicit Sub ResetWindowList(F As Form, Operation As String) 'define variables Dim Counter As Integer 'intialize variables Counter = frmStartup.mnuWindowList.lBound + 1 Do Until Counter > frmStartup.mnuWindowList.UBound If frmStartup.mnuWindowList(Counter).Caption = F.Caption Then Select Case Operation Case "add" frmStartup.mnuWindowList(Counter).Checked = True Case "remove" frmStartup.mnuWindowList(Counter).Checked = False End Select Exit Do End If Counter = Counter + 1 Loop End Sub Sub WindowListAddItem(F As Form) 'define variables Dim NextWindowSlot As Integer 'initialize variables NextWindowSlot = frmStartup.mnuWindowList.UBound + 1 'add F.Caption to a new mnuWindowList entry one past the last one With frmStartup Load .mnuWindowList(NextWindowSlot) .mnuWindowList(NextWindowSlot).Visible = True .mnuWindowList(NextWindowSlot).Caption = F.Caption .mnuWindowSeperator.Visible = True End With 'enable the Arrange, Cascade, and Tile windows functions if more than one form 'is on the window list If frmStartup.mnuWindowList.Count >= 3 Then frmStartup.mnuWindowArrange.Enabled = True frmStartup.mnuWindowCascade.Enabled = True frmStartup.mnuWindowTile.Enabled = True End If End Sub Sub WindowListRemoveItem(F As Form) 'define variables Dim Counter As Integer Dim LastWindowSlot As Integer 'initialize variables Counter = frmStartup.mnuWindowList.lBound + 1 LastWindowSlot = frmStartup.mnuWindowList.UBound 'unload the mnuWindowList entry with a caption equal to F.Caption Do Until Counter > LastWindowSlot With frmStartup If .mnuWindowList(Counter).Caption = F.Caption Then Unload .mnuWindowList(Counter) Exit Do End If End With Counter = Counter + 1 Loop 'disable the Arrange, Cascade, and Tile windows functions if only one form 'is on the window list If frmStartup.mnuWindowList.Count < 3 Then frmStartup.mnuWindowArrange.Enabled = False frmStartup.mnuWindowCascade.Enabled = False frmStartup.mnuWindowTile.Enabled = False End If End Sub