Access/VBA Library

Refresh Method

Rebuilds the list of active windows.

Syntax

ActiveWindowList.Refresh()
Parameters
Name Type Description
ActiveWindowList   The name of an object of type ActiveWindowList
ActiveWindowListtag:ActiveWindowList

Remarks

  • This method is call at the constructor of an object. When the object is alive for a short period of time does not need to be invoked.
Example
  '
  ' Find MyApplication in the list and activate
  '
  Dim WindowList As New ActiveWindowList
  Dim Index As Long

  Index = WindowList.Find("MyApplication")

  If Index Then
      ' Activate the Window
      WindowList.Activate Index
  Else
      'Refresh list, maybe it's there now...
      WindowList.Refresh
  End If