Code Examples

Display List of Open Windows


The example displays the Window List dialog box as displayed by the Windows, More Windows menu option. This works even if there are less than 8 windows open.

'***************** Code Start *******************
'Code by Terry Wickenden

Sub WinList()
  On Error GoTo ErrWinList

  DoCmd.RunCommand acCmdMoreWindows
  Exit Sub

  Select Case Err
    Case 2501
      'Cancel selected in the dialog box
    Case Else
      MsgBox Err & Err.Description
  End Select

End Sub

'****************** Code End ********************

© 1998 - 2011 Terry Wickenden TKW Design Site developed maintained and hosted by TKW Design. This site is best viewed at 1024 x 768. Optimised for Firefox.